初始化项目,由ModelHub XC社区提供模型
Model: cs-552-2026-databand/group_model Source: Original Platform
This commit is contained in:
17
chat_template.jinja
Normal file
17
chat_template.jinja
Normal file
@@ -0,0 +1,17 @@
|
||||
{#- Training-compatible Qwen3 chat template with thinking disabled.
|
||||
Renders the same tokens as Qwen3 official + enable_thinking=false, plus
|
||||
{% generation %} markers around the assistant turn so trl.SFTTrainer can
|
||||
mask user tokens via assistant_only_loss=True. The generation markers are
|
||||
a no-op at inference. -#}
|
||||
{%- for message in messages -%}
|
||||
{%- if message.role == 'system' -%}
|
||||
{{- '<|im_start|>system\n' + message.content + '<|im_end|>\n' -}}
|
||||
{%- elif message.role == 'user' -%}
|
||||
{{- '<|im_start|>user\n' + message.content + '<|im_end|>\n' -}}
|
||||
{%- elif message.role == 'assistant' -%}
|
||||
{% generation %}{{ '<|im_start|>assistant\n<think>\n\n</think>\n\n' + message.content + '<|im_end|>\n' }}{% endgeneration %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if add_generation_prompt -%}
|
||||
{{- '<|im_start|>assistant\n<think>\n\n</think>\n\n' -}}
|
||||
{%- endif -%}
|
||||
Reference in New Issue
Block a user