初始化项目,由ModelHub XC社区提供模型

Model: AI-ModelScope/R-4B
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-21 17:44:12 +08:00
commit 3ddb0fa7ff
27 changed files with 3526 additions and 0 deletions

11
chat_template.jinja Normal file
View File

@@ -0,0 +1,11 @@
{% for message in messages %}{{'<|im_start|>' + message['role'] + '
'}}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>
' }}{% endfor %}{# Render all video then #}{% for content in message['content'] | selectattr('type', 'equalto', 'video') %}{{ '<video>
' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ content['text'] }}{% endgeneration %}{% endfor %}{% endif %}{{'<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
<think>' }}{% endif %}{%- if add_generation_prompt %}{%- if thinking_mode is defined and thinking_mode == 'short' %}{{- '
</think>
' }}{%- endif %}{%- if thinking_mode is defined and thinking_mode == 'long' %}{{- '
' }}{%- endif %}{%- endif %}