diff --git a/chatproto/conversation/models/qwen.py b/chatproto/conversation/models/qwen.py index 6a38b79..7751d83 100644 --- a/chatproto/conversation/models/qwen.py +++ b/chatproto/conversation/models/qwen.py @@ -16,3 +16,11 @@ ], # "<|endoftext|>", "<|im_start|>", "<|im_end|>" stop_str="<|endoftext|>", ) + +Qwen = qwen.alias("Qwen") + +qwen1 = qwen.alias("qwen1") +Qwen1 = qwen.alias("Qwen1") + +qwen15 = qwen.alias("qwen1.5") +Qwen15 = qwen.alias("Qwen1.5") \ No newline at end of file diff --git a/chatproto/conversation/models/xverse.py b/chatproto/conversation/models/xverse.py new file mode 100644 index 0000000..de1775e --- /dev/null +++ b/chatproto/conversation/models/xverse.py @@ -0,0 +1,18 @@ +from ..settings import ConversationSettings, SeparatorStyle + +# xverse template: https://huggingface.co/xverse/XVERSE-13B-Chat/blob/main/modeling_xverse.py#L780 +xverse = ConversationSettings( + name="xverse", + system_template="Human: {system_message}\n", + roles=("Human", "Assistant"), + sep_style=SeparatorStyle.ADD_COLON_TWO, + sep="\n\n", + sep2="<|endoftext|>", + stop_token_ids=[ + 3, + ], # eos_token_id: <|endoftext|> + stop_str="<|endoftext|>", +) + + +XVERSE = xverse.alias("XVERSE") \ No newline at end of file diff --git a/chatproto/conversation/models/yi.py b/chatproto/conversation/models/yi.py new file mode 100644 index 0000000..29d453e --- /dev/null +++ b/chatproto/conversation/models/yi.py @@ -0,0 +1,19 @@ +from ..settings import ConversationSettings, SeparatorStyle + +# Yi template: https://huggingface.co/01-ai/Yi-6B-Chat/blob/main/tokenizer_config.json +yi = ConversationSettings( + name="yi", + roles=("<|im_start|>user", "<|im_start|>assistant"), + sep_style=SeparatorStyle.CHATML, + sep="<|im_end|>", + stop_token_ids=[ + 2, + 6, + 7, + 8, + ], # "<|endoftext|>", "<|im_start|>", "<|im_end|>", "<|im_sep|>" + stop_str="<|endoftext|>", +) + + +Yi = yi.alias("Yi") \ No newline at end of file