File size: 1,852 Bytes
fdcf80f
aac308a
 
 
 
 
fdcf80f
2251e1f
 
ec39c42
 
1d9464f
ec39c42
2251e1f
fdcf80f
aac308a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2251e1f
 
aac308a
 
 
 
 
 
 
 
 
2251e1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import gradio as gr
import json
import requests
import openai



def response_print(model_list, response_list):
    answer = ""
    cot = "CoT"
    none = "None"
    for idx in range(len(model_list)):
        answer = answer + f"# {model_list[idx]}'s response: {cot if response_list else none}\n"
    return answer

TITLE = """<h1 align="center">LLM Agora ๐Ÿ—ฃ๏ธ๐Ÿฆ</h1>"""

INTRODUCTION_TEXT = """
The **LLM Agora ๐Ÿ—ฃ๏ธ๐Ÿฆ** aims to improve the quality of open-source LMs' responses through debate & revision introduced in [Improving Factuality and Reasoning in Language Models through Multiagent Debate](https://arxiv.org/abs/2305.14325).

Do you know that? ๐Ÿค” **LLMs can also improve their responses by debating with other LLMs**! ๐Ÿ˜ฎ We applied this concept to several open-source LMs to verify that the open-source model, not the proprietary one, can sufficiently improve the response through discussion. ๐Ÿค—
For more details, please refer to the GitHub Repository below.

You can use LLM Agora with your own questions if the response of open-source LM is not satisfactory and you want to improve the quality!
The Math, GSM8K, and MMLU Tabs show the results of the experiment, and for inference, please use the 'Inference' tab.

Please check the more specific information in [GitHub Repository](https://github.com/gauss5930/LLM-Agora)!
"""

with gr.Blocks() as demo:
    gr.HTML(TITLE)
    gr.Markdown(INTRODUCTION_TEXT)

    with gr.Tab("Inference"):
        gr.CheckboxGroup(["Llama2", "Alpaca", "Vicuna", "Koala", "Falcon", "Baize", "WizardLM", "Orca", "phi-1.5"], label="Model Selection", info="Choose 3 LMs to participate in LLM Agora."),
        gr.Checkbox(label="CoT", info="Do you want to use CoT for inference?")
    
    with gr.Tab("Math"):
        text
    
    with gr.Tab("GSM8K"):

    with gr.Tab("MMLU"):


demo.launch()