初始化项目,由ModelHub XC社区提供模型
Model: qingy2024/GRMR-V3-L1B Source: Original Platform
This commit is contained in:
31
chat_template.jinja
Normal file
31
chat_template.jinja
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- bos_token }}
|
||||
{%- if not date_string is defined %}
|
||||
{%- if strftime_now is defined %}
|
||||
{%- set date_string = strftime_now("%d %b %Y") %}
|
||||
{%- else %}
|
||||
{%- set date_string = "26 Jul 2024" %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{#- Remove system message handling entirely #}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{%- set messages = messages[1:] %}
|
||||
{%- endif %}
|
||||
|
||||
{#- Process messages with role mapping #}
|
||||
{%- for message in messages %}
|
||||
{%- if message['role'] == 'user' %}
|
||||
{{- '<|start_header_id|>text<|end_header_id|>
|
||||
|
||||
'+ message['content'] | trim + '<|eot_id|>' }}
|
||||
{%- elif message['role'] == 'assistant' %}
|
||||
{{- '<|start_header_id|>corrected<|end_header_id|>
|
||||
|
||||
'+ message['content'] | trim + '<|eot_id|>' }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|start_header_id|>corrected<|end_header_id|>
|
||||
|
||||
' }}
|
||||
{%- endif %}
|
||||
Reference in New Issue
Block a user