Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Notus support #2813

Merged
merged 4 commits into from
Jan 7, 2024
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
1 change: 1 addition & 0 deletions docs/model_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- example: `python3 -m fastchat.serve.cli --model-path mosaicml/mpt-7b-chat`
- [Neutralzz/BiLLa-7B-SFT](https://huggingface.co/Neutralzz/BiLLa-7B-SFT)
- [nomic-ai/gpt4all-13b-snoozy](https://huggingface.co/nomic-ai/gpt4all-13b-snoozy)
- [argilla/notus-7b-v1](https://huggingface.co/argilla/notus-7b-v1)
- [NousResearch/Nous-Hermes-13b](https://huggingface.co/NousResearch/Nous-Hermes-13b)
- [openaccess-ai-collective/manticore-13b-chat-pyg](https://huggingface.co/openaccess-ai-collective/manticore-13b-chat-pyg)
- [OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5](https://huggingface.co/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5)
Expand Down
11 changes: 11 additions & 0 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,16 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
return get_conv_template("zephyr")


class NotusAdapter(BaseModelAdapter):
"""The model adapter for Notus (e.g. argilla/notus-7b-v1)"""

def match(self, model_path: str):
return "notus" in model_path.lower()

def get_default_conv_template(self, model_path: str) -> Conversation:
return get_conv_template("zephyr")


class CatPPTAdapter(BaseModelAdapter):
"""The model adapter for CatPPT (e.g. rishiraj/CatPPT)"""

Expand Down Expand Up @@ -2161,6 +2171,7 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
register_model_adapter(CodeLlamaAdapter)
register_model_adapter(Llama2ChangAdapter)
register_model_adapter(ZephyrAdapter)
register_model_adapter(NotusAdapter)
register_model_adapter(CatPPTAdapter)
register_model_adapter(TinyLlamaAdapter)
register_model_adapter(XwinLMAdapter)
Expand Down
7 changes: 7 additions & 0 deletions fastchat/model/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ def get_model_info(name: str) -> ModelInfo:
"a chatbot fine-tuned from Mistral by Hugging Face",
)

register_model_info(
["notus-7b-v1"],
"Notus",
"https://huggingface.co/argilla/notus-7b-v1",
"a chatbot fine-tuned from Zephyr SFT by Argilla",
)

register_model_info(
["catppt"],
"CatPPT",
Expand Down