From d1e9305b59c3c1dd58bb636b50b33e749bee6d63 Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Fri, 29 Sep 2023 04:58:35 +0000 Subject: [PATCH] add a custom model --- fastchat/serve/gradio_block_arena_anony.py | 2 ++ fastchat/serve/gradio_web_server.py | 3 +++ fastchat/serve/gradio_web_server_multi.py | 1 + 3 files changed, 6 insertions(+) diff --git a/fastchat/serve/gradio_block_arena_anony.py b/fastchat/serve/gradio_block_arena_anony.py index 7859e31ec..73fc6a511 100644 --- a/fastchat/serve/gradio_block_arena_anony.py +++ b/fastchat/serve/gradio_block_arena_anony.py @@ -161,6 +161,7 @@ def share_click(state0, state1, model_selector0, model_selector1, request: gr.Re "gpt-3.5-turbo": 2, "claude-2": 2, "claude-instant-1": 2, + "deluxe-chat-v1": 2, # tire 1 "palm-2": 1.5, "llama-2-70b-chat": 1.5, @@ -176,6 +177,7 @@ def share_click(state0, state1, model_selector0, model_selector1, request: gr.Re "vicuna-7b": 1.0, "llama-2-7b-chat": 1.0, "chatglm2-6b": 1.0, + "mistral-7b-instruct": 1.0, # deprecated "guanaco-33b": 1.0, "fastchat-t5-3b": 0.5, diff --git a/fastchat/serve/gradio_web_server.py b/fastchat/serve/gradio_web_server.py index e66a7622c..4e5c84911 100644 --- a/fastchat/serve/gradio_web_server.py +++ b/fastchat/serve/gradio_web_server.py @@ -146,6 +146,9 @@ def get_model_list( models += ["palm-2"] models = list(set(models)) + if "deluxe-chat-v1" in models: + del models[models.index("deluxe-chat-v1")] + priority = {k: f"___{i:02d}" for i, k in enumerate(model_info)} models.sort(key=lambda x: priority.get(x, x)) logger.info(f"Models: {models}") diff --git a/fastchat/serve/gradio_web_server_multi.py b/fastchat/serve/gradio_web_server_multi.py index 92618d911..f1dbca963 100644 --- a/fastchat/serve/gradio_web_server_multi.py +++ b/fastchat/serve/gradio_web_server_multi.py @@ -87,6 +87,7 @@ def load_demo(url_params, request: gr.Request): models_anony += ["claude-2", "claude-instant-1"] if args.add_palm: models_anony += ["palm-2"] + models_anony.append("deluxe-chat-v1") side_by_side_anony_updates = load_demo_side_by_side_anony(models_anony, url_params) side_by_side_named_updates = load_demo_side_by_side_named(models, url_params)