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

Model: nsomazr/blood-donation-gemma3-1bb-merged-16bit
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-24 12:48:17 +08:00
commit 9ef61a61fd
7 changed files with 174 additions and 0 deletions

11
chat_template.jinja Normal file
View File

@@ -0,0 +1,11 @@
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ '<|begin_of_text|><|start_header_id|>system<|end_header_id|>
' + messages[0]['content'] + '<|eot_id|>' }}{% set loop_messages = messages[1:] %}{% else %}{{ '<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a helpful and knowledgeable blood donation advisor serving Tanzania. You answer questions accurately and concisely in both English and Swahili (Kiswahili). IMPORTANT: Always respond in the same language the user writes in. If the user writes in Swahili, respond fully in Swahili. If the user writes in English, respond in English. Never switch languages mid-response unless the user does so first.<|eot_id|>' }}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>
' + message['content'] }}{% elif message['role'] == 'assistant' %}{{ '<|eot_id|><|start_header_id|>assistant<|end_header_id|>
' + message['content'] + '<|eot_id|><end_of_turn>' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|eot_id|><|start_header_id|>assistant<|end_header_id|>
' }}{% endif %}