Unverified Commit af6c5357 authored by Enrique Shockwave's avatar Enrique Shockwave Committed by GitHub
Browse files

deepseek v3 and r1 chat template (#3015)

parent 3ad4cd49
......@@ -354,6 +354,37 @@ register_chat_template(
)
register_chat_template(
ChatTemplate(
name="deepseek-v3",
default_system_prompt=None,
role_prefix_and_suffix={
"system": (
"",
"",
),
"user": (
"<|User|>",
"",
),
"assistant": (
"<|Assistant|>",
"<|end▁of▁sentence|>",
),
},
stop_str=("<|end▁of▁sentence|>",),
)
)
@register_chat_template_matching_function
def match_deepseek(model_path: str):
if (
"deepseek-v3" in model_path.lower() or "deepseek-r1" in model_path.lower()
) and "base" not in model_path.lower():
return get_chat_template("deepseek-v3")
@register_chat_template_matching_function
def match_dbrx(model_path: str):
if "dbrx" in model_path.lower() and "instruct" in model_path.lower():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment