Skip to content

Commit

Permalink
register custom model
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Oct 6, 2023
1 parent 5573aae commit 8f4b5b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ def add_text(
w = SAMPLING_WEIGHTS.get(a, 1.0) * SAMPLING_WEIGHTS.get(b, 1.0)
if a in SAMPLING_BOOST_MODELS or b in SAMPLING_BOOST_MODELS:
w *= 10
if (a in {"gpt-4", "deluxe-chat-v1"} and
b in {"gpt-4", "deluxe-chat-v1"}):
w *= 8
model_pairs.append((a, b))
model_pairs_weights.append(w)

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 8f4b5b9

Please sign in to comment.