Skip to content

Commit

Permalink
add starling support
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston committed Nov 27, 2023
1 parent 76fbdef commit 280da6d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,11 @@ class OpenChat35Adapter(BaseModelAdapter):
"""The model adapter for OpenChat 3.5 (e.g. openchat/openchat_3.5)"""

def match(self, model_path: str):
return "openchat" in model_path.lower() and "3.5" in model_path.lower()
if "openchat" in model_path.lower() and "3.5" in model_path.lower():
return True
elif "starling-lm" in model_path.lower():
return True
return False

def get_default_conv_template(self, model_path: str) -> Conversation:
return get_conv_template("openchat_3.5")
Expand Down
6 changes: 6 additions & 0 deletions fastchat/model/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ def get_model_info(name: str) -> ModelInfo:
"https://github.com/imoneoi/openchat",
"OpenChat 3.5 is a versatile, open-source language model fine-tuned using C-RLFT",
)
register_model_info(
["starling-lm-7b-alpha"],
"Starling-LM-7B-alpha",
"https://huggingface.co/berkeley-nest/Starling-LM-7B-alpha",
"an open model trained by RLAIF",
)
register_model_info(
["llama-7b", "llama-13b"],
"LLaMA",
Expand Down

0 comments on commit 280da6d

Please sign in to comment.