Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format
  • Loading branch information
infwinston committed Feb 9, 2024
commit 4bccd7d886d50eb99583553913ecbca32bca2c14
4 changes: 3 additions & 1 deletion fastchat/llm_judge/qa_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ def build_demo():
) = load_pairwise_model_judgments(pairwise_model_judgment_file)

demo = build_demo()
demo.queue(default_concurrency_limit=10, status_update_rate=10, api_open=False).launch(
demo.queue(
default_concurrency_limit=10, status_update_rate=10, api_open=False
).launch(
server_name=args.host, server_port=args.port, share=args.share, max_threads=200
)
25 changes: 16 additions & 9 deletions fastchat/model/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,27 @@ def get_model_info(name: str) -> ModelInfo:
)

register_model_info(
["mixtral-8x7b-instruct-v0.1", "mistral-medium", "mistral-7b-instruct-v0.2", "mistral-7b-instruct"],
[
"mixtral-8x7b-instruct-v0.1",
"mistral-medium",
"mistral-7b-instruct-v0.2",
"mistral-7b-instruct",
],
"Mixtral of experts",
"https://mistral.ai/news/mixtral-of-experts/",
"A Mixture-of-Experts model by Mistral AI",
)

register_model_info(
["qwen1.5-72b-chat",
"qwen1.5-14b-chat",
"qwen1.5-7b-chat",
"qwen1.5-4b-chat",
"qwen1.5-1.8b-chat",
"qwen1.5-0.5b-chat",
"qwen-14b-chat"],
[
"qwen1.5-72b-chat",
"qwen1.5-14b-chat",
"qwen1.5-7b-chat",
"qwen1.5-4b-chat",
"qwen1.5-1.8b-chat",
"qwen1.5-0.5b-chat",
"qwen-14b-chat",
],
"Qwen 1.5",
"https://qwenlm.github.io/blog/qwen1.5/",
"a large language model by Alibaba Cloud",
Expand Down Expand Up @@ -101,7 +108,7 @@ def get_model_info(name: str) -> ModelInfo:
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0314",
"gpt-3.5-turbo-0613"
"gpt-3.5-turbo-0613",
],
"GPT-3.5",
"https://platform.openai.com/docs/models/gpt-3-5",
Expand Down
5 changes: 4 additions & 1 deletion fastchat/serve/call_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def __init__(self, log_dir: str):
self.log_dir = log_dir
self.model_call = {}
self.user_call = {}
self.model_call_limit_global = {"gpt-4-1106-preview": 300, "gpt-4-0125-preview": 300}
self.model_call_limit_global = {
"gpt-4-1106-preview": 300,
"gpt-4-0125-preview": 300,
}
self.model_call_day_limit_per_user = {"gpt-4-1106-preview": 10}

async def update_stats(self, num_file=1) -> None:
Expand Down
11 changes: 9 additions & 2 deletions fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ def share_click(state0, state1, model_selector0, model_selector1, request: gr.Re
BATTLE_TARGETS = {
"gpt-4": {"gpt-4-0314", "claude-2.1", "gpt-4-1106-preview"},
"gpt-4-0613": {"gpt-4-0314", "claude-2.1", "gpt-4-1106-preview"},
"gpt-4-0314": {"gpt-4-1106-preview", "gpt-4-0613", "claude-2.1", "gpt-3.5-turbo-0613"},
"gpt-4-0314": {
"gpt-4-1106-preview",
"gpt-4-0613",
"claude-2.1",
"gpt-3.5-turbo-0613",
},
"gpt-4-1106-preview": {
"gpt-4-0613",
"gpt-3.5-turbo-0613",
Expand Down Expand Up @@ -653,7 +658,9 @@ def build_side_by_side_ui_anony(models):
with gr.Row():
for i in range(num_sides):
with gr.Column():
model_selectors[i] = gr.Markdown(anony_names[i], elem_id="model_selector_md")
model_selectors[i] = gr.Markdown(
anony_names[i], elem_id="model_selector_md"
)
with gr.Row():
slow_warning = gr.Markdown("", elem_id="notice_markdown")

Expand Down
8 changes: 4 additions & 4 deletions fastchat/serve/gradio_web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ def load_demo_single(models, url_params):
if model in models:
selected_model = model

dropdown_update = gr.Dropdown(
choices=models, value=selected_model, visible=True
)
dropdown_update = gr.Dropdown(choices=models, value=selected_model, visible=True)

state = None
return state, dropdown_update
Expand Down Expand Up @@ -933,7 +931,9 @@ def build_demo(models):
# Launch the demo
demo = build_demo(models)
demo.queue(
default_concurrency_limit=args.concurrency_count, status_update_rate=10, api_open=False
default_concurrency_limit=args.concurrency_count,
status_update_rate=10,
api_open=False,
).launch(
server_name=args.host,
server_port=args.port,
Expand Down
3 changes: 2 additions & 1 deletion fastchat/serve/gradio_web_server_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def build_demo(models, elo_results_file, leaderboard_table_file):
demo = build_demo(models, args.elo_results_file, args.leaderboard_table_file)
demo.queue(
default_concurrency_limit=args.concurrency_count,
status_update_rate=10, api_open=False
status_update_rate=10,
api_open=False,
).launch(
server_name=args.host,
server_port=args.port,
Expand Down
4 changes: 3 additions & 1 deletion fastchat/serve/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ def build_demo(elo_results_file, leaderboard_table_file):

demo = build_demo(args.elo_results_file, args.leaderboard_table_file)
demo.queue(
default_concurrency_limit=args.concurrency_count, status_update_rate=10, api_open=False
default_concurrency_limit=args.concurrency_count,
status_update_rate=10,
api_open=False,
).launch(
server_name=args.host, server_port=args.port, share=args.share, max_threads=200
)