Skip to content

Commit

Permalink
register a custom model
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Sep 22, 2023
1 parent a040cdc commit 3d86443
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": 5,
# tire 1
"palm-2": 1.5,
"llama-2-70b-chat": 1.5,
Expand Down
3 changes: 3 additions & 0 deletions fastchat/serve/gradio_web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 1 addition & 0 deletions fastchat/serve/gradio_web_server_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3d86443

Please sign in to comment.