Skip to content
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
12 changes: 12 additions & 0 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,18 @@ def get_conv_template(name: str) -> Conversation:
)
)

register_conv_template(
Conversation(
name="chinese-alpaca2",
system_template="[INST] <<SYS>>\n{system_message}\n<</SYS>>\n\n",
system_message="You are a helpful assistant. 你是一个乐于助人的助手。请你提供专业、有逻辑、内容真实、有价值的详细回复。",
roles=("[INST]", "[/INST]"),
sep_style=SeparatorStyle.LLAMA2,
sep=" ",
sep2=" </s><s>",
)
)

register_conv_template(
Conversation(
name="cutegpt",
Expand Down
2 changes: 1 addition & 1 deletion fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ def load_model(self, model_path: str, from_pretrained_kwargs: dict):
return model, tokenizer

def get_default_conv_template(self, model_path: str) -> Conversation:
return get_conv_template("llama2-chinese")
return get_conv_template("chinese-alpaca2")


class VigogneAdapter(BaseModelAdapter):
Expand Down