Skip to content

Commit 87ed32d

Browse files
sarath-shekkizharzhanghao.smooth
authored andcommitted
Add TenyxChat-7B-v1 model (lm-sys#2901)
Co-authored-by: sarath@L3 <[omitted]>
1 parent 54489f0 commit 87ed32d

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

docs/model_support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- [project-baize/baize-v2-7b](https://huggingface.co/project-baize/baize-v2-7b)
4949
- [Qwen/Qwen-7B-Chat](https://huggingface.co/Qwen/Qwen-7B-Chat)
5050
- [rishiraj/CatPPT](https://huggingface.co/rishiraj/CatPPT)
51+
- [tenyx/TenyxChat-7B-v1](https://huggingface.co/tenyx/TenyxChat-7B-v1)
5152
- [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
5253
- [Salesforce/codet5p-6b](https://huggingface.co/Salesforce/codet5p-6b)
5354
- [StabilityAI/stablelm-tuned-alpha-7b](https://huggingface.co/stabilityai/stablelm-tuned-alpha-7b)

fastchat/conversation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,16 @@ def get_conv_template(name: str) -> Conversation:
561561
)
562562
)
563563

564+
# TenyxChat default template
565+
register_conv_template(
566+
Conversation(
567+
name="tenyxchat",
568+
roles=("User", "Assistant"),
569+
sep_style=SeparatorStyle.FALCON_CHAT,
570+
sep="<|end_of_turn|>",
571+
)
572+
)
573+
564574
# Deepseek code default template
565575
register_conv_template(
566576
Conversation(

fastchat/model/model_adapter.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,16 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
932932
return get_conv_template("openchat_3.5")
933933

934934

935+
class TenyxChatAdapter(BaseModelAdapter):
936+
"""The model adapter for TenyxChat (e.g. tenyx/TenyxChat-7B-v1)"""
937+
938+
def match(self, model_path: str):
939+
return "tenyxchat" in model_path.lower()
940+
941+
def get_default_conv_template(self, model_path: str) -> Conversation:
942+
return get_conv_template("tenyxchat")
943+
944+
935945
class PythiaAdapter(BaseModelAdapter):
936946
"""The model adapter for any EleutherAI/pythia model"""
937947

@@ -2167,6 +2177,7 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
21672177
register_model_adapter(OasstPythiaAdapter)
21682178
register_model_adapter(OasstLLaMAAdapter)
21692179
register_model_adapter(OpenChat35Adapter)
2180+
register_model_adapter(TenyxChatAdapter)
21702181
register_model_adapter(StableLMAdapter)
21712182
register_model_adapter(BaizeAdapter)
21722183
register_model_adapter(RwkvAdapter)

fastchat/model/model_registry.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ def get_model_info(name: str) -> ModelInfo:
161161
"an open model fine-tuned on Mistral-7B using C-RLFT",
162162
)
163163

164+
register_model_info(
165+
["tenyxchat-7b-v1"],
166+
"TenyxChat-7B",
167+
"https://huggingface.co/tenyx/TenyxChat-7B-v1",
168+
"an open model DPO trained on top of OpenChat-3.5 using Tenyx fine-tuning",
169+
)
170+
164171
register_model_info(
165172
["zephyr-7b-beta", "zephyr-7b-alpha"],
166173
"Zephyr",

0 commit comments

Comments
 (0)