初始化项目,由ModelHub XC社区提供模型
Model: cs-552-2026-centralesupechec/general_knowledge_model Source: Original Platform
This commit is contained in:
29
chat_template.jinja
Normal file
29
chat_template.jinja
Normal file
@@ -0,0 +1,29 @@
|
||||
{#-
|
||||
General Knowledge — thinking-enabled chat template for Qwen3-1.7B.
|
||||
Allows the model to emit a <think>...</think> reasoning block first, then
|
||||
the final \boxed{LETTER} answer.
|
||||
|
||||
The CI calls:
|
||||
tokenizer.apply_chat_template(messages, add_generation_prompt=True)
|
||||
with no extra kwargs, so any behaviour we want must be encoded here.
|
||||
-#}
|
||||
{%- set gk_system = "You are a knowledge expert. Read the question and the labelled options carefully. Reason step by step inside <think> ... </think>, then choose exactly one option. End your reply with the letter of the correct option wrapped in \\boxed{}, e.g. \\boxed{C}. Do not output anything after the boxed answer." -%}
|
||||
|
||||
{%- if messages[0].role == 'system' -%}
|
||||
{{- '<|im_start|>system\n' + messages[0].content + '\n\n' + gk_system + '<|im_end|>\n' -}}
|
||||
{%- set messages = messages[1:] -%}
|
||||
{%- else -%}
|
||||
{{- '<|im_start|>system\n' + gk_system + '<|im_end|>\n' -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- for message in messages -%}
|
||||
{%- if message.role == 'user' -%}
|
||||
{{- '<|im_start|>user\n' + message.content + '<|im_end|>\n' -}}
|
||||
{%- elif message.role == 'assistant' -%}
|
||||
{{- '<|im_start|>assistant\n' + message.content + '<|im_end|>\n' -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
|
||||
{%- if add_generation_prompt -%}
|
||||
{{- '<|im_start|>assistant\n<think>\n' -}}
|
||||
{%- endif -%}
|
||||
Reference in New Issue
Block a user