Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions fastchat/llm_judge/qa_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

def display_question(category_selector, request: gr.Request):
choices = category_selector_map[category_selector]
return gr.Dropdown.update(
return gr.Dropdown(
value=choices[0],
choices=choices,
)
Expand Down Expand Up @@ -413,6 +413,8 @@ def build_demo():
) = load_pairwise_model_judgments(pairwise_model_judgment_file)

demo = build_demo()
demo.queue(concurrency_count=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
)
2 changes: 2 additions & 0 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-turbo",
"gpt-4-1106-preview",
"gpt-4-0125-preview",
)

Expand Down
81 changes: 64 additions & 17 deletions fastchat/model/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,39 @@ def get_model_info(name: str) -> ModelInfo:
)

register_model_info(
["mixtral-8x7b-instruct-v0.1", "mistral-medium", "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",
],
"Qwen 1.5",
"https://qwenlm.github.io/blog/qwen1.5/",
"a large language model by Alibaba Cloud",
)

register_model_info(
["qwen-14b-chat"],
"Qwen",
"https://huggingface.co/Qwen",
"a large language model by Alibaba Cloud",
)

register_model_info(
["bard-feb-2024", "bard-jan-24-gemini-pro"],
"Bard",
Expand Down Expand Up @@ -83,14 +110,20 @@ def get_model_info(name: str) -> ModelInfo:
)

register_model_info(
["gpt-4-turbo", "gpt-4-0125-preview"],
["gpt-4-turbo", "gpt-4-1106-preview", "gpt-4-0125-preview"],
"GPT-4-Turbo",
"https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo",
"GPT-4-Turbo by OpenAI",
)

register_model_info(
["gpt-3.5-turbo", "gpt-3.5-turbo-0314", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106"],
[
"gpt-3.5-turbo",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0314",
"gpt-3.5-turbo-0613",
],
"GPT-3.5",
"https://platform.openai.com/docs/models/gpt-3-5",
"GPT-3.5-Turbo by OpenAI",
Expand Down Expand Up @@ -124,6 +157,34 @@ def get_model_info(name: str) -> ModelInfo:
"Claude Instant by Anthropic",
)

register_model_info(
["nous-hermes-2-mixtral-8x7b-dpo"],
"Nous-Hermes-2-Mixtral-8x7B-DPO",
"https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
"Nous Hermes finetuned from Mixtral 8x7B",
)

register_model_info(
["openchat-3.5-0106", "openchat-3.5"],
"OpenChat 3.5",
"https://github.com/imoneoi/openchat",
"an open model fine-tuned on Mistral-7B using C-RLFT",
)

register_model_info(
["deepseek-llm-67b-chat"],
"DeepSeek LLM",
"https://huggingface.co/deepseek-ai/deepseek-llm-67b-chat",
"An advanced language model by DeepSeek",
)

register_model_info(
["stripedhyena-nous-7b"],
"StripedHyena-Nous",
"https://huggingface.co/togethercomputer/StripedHyena-Nous-7B",
"A chat model developed by Together Research and Nous Research.",
)

register_model_info(
["llama2-70b-steerlm-chat"],
"Llama2-70B-SteerLM-Chat",
Expand Down Expand Up @@ -194,13 +255,6 @@ def get_model_info(name: str) -> ModelInfo:
"an open bilingual dialogue language model by Tsinghua University",
)

register_model_info(
["openchat-3.5"],
"OpenChat 3.5",
"https://github.com/imoneoi/openchat",
"an open model fine-tuned on Mistral-7B using C-RLFT",
)

register_model_info(
["tenyxchat-7b-v1"],
"TenyxChat-7B",
Expand Down Expand Up @@ -236,13 +290,6 @@ def get_model_info(name: str) -> ModelInfo:
"The TinyLlama project is an open endeavor to pretrain a 1.1B Llama model on 3 trillion tokens.",
)

register_model_info(
["qwen-14b-chat"],
"Qwen",
"https://huggingface.co/Qwen/Qwen-14B-Chat",
"a large language model by Alibaba Cloud",
)

register_model_info(
["codellama-34b-instruct", "codellama-13b-instruct", "codellama-7b-instruct"],
"Code Llama",
Expand Down
2 changes: 1 addition & 1 deletion fastchat/serve/api_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def mistral_api_stream_iter(model_name, messages, temperature, top_p, max_new_to


def nvidia_api_stream_iter(model_name, messages, temp, top_p, max_tokens, api_base):
assert model_name in ["llama2-70b-steerlm-chat"]
assert model_name in ["llama2-70b-steerlm-chat", "yi-34b-chat"]

api_key = os.environ["NVIDIA_API_KEY"]
headers = {
Expand Down
7 changes: 5 additions & 2 deletions fastchat/serve/call_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ def __init__(self, log_dir: str):
self.log_dir = log_dir
self.model_call = {}
self.user_call = {}
self.model_call_limit_global = {"gpt-4-turbo": 300, "gpt-4-0125-preview": 300}
self.model_call_day_limit_per_user = {"gpt-4-turbo": 10}
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:
while True:
Expand Down
Loading