初始化项目,由ModelHub XC社区提供模型
Model: cs-552-2026-MMRF/group_model Source: Original Platform
This commit is contained in:
31
chat_template.jinja
Normal file
31
chat_template.jinja
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
{%- set enable_thinking = true %}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{%- set system_message = messages[0]['content'] %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- else %}
|
||||
{%- set system_message = 'You are a helpful assistant . Reason carefully. The final answer should always be strictly inside \\boxed{}. For MCQ the answer should be 1 letter.Always output final answer in \\boxed{} no matter the question. Strictly respect this condition.' %}
|
||||
{%- endif %}
|
||||
{%- for message in messages %}
|
||||
{%- if message['role'] == 'user' %}
|
||||
{%- if loop.first and system_message %}
|
||||
{{- "<|im_start|>system\n" + system_message + "<|im_end|>\n" }}
|
||||
{%- endif %}
|
||||
{{- "<|im_start|>user\n" + message['content'] + "<|im_end|>\n" }}
|
||||
{%- elif message['role'] == 'assistant' %}
|
||||
{{- "<|im_start|>assistant\n" }}
|
||||
{%- if enable_thinking %}
|
||||
{%- if message.get('think') %}
|
||||
{{- "<think>\n" + message['think'] + "\n</think>\n" }}
|
||||
{%- else %}
|
||||
{{- "<think>\n" }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{{- message['content'] + "<|im_end|>\n" }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if enable_thinking %}
|
||||
{{- "<|im_start|>assistant\n<think>\n" }}
|
||||
{%- else %}
|
||||
{{- "<|im_start|>assistant\n" }}
|
||||
{%- endif %}
|
||||
Reference in New Issue
Block a user