初始化项目,由ModelHub XC社区提供模型
Model: RudraChakrin/Llama-3.1-8B-Instruct-TTS-Phonetic-Denglish Source: Original Platform
This commit is contained in:
20
chat_template.jinja
Normal file
20
chat_template.jinja
Normal file
@@ -0,0 +1,20 @@
|
||||
{% if messages[0]['role'] == 'system' %}
|
||||
{% set loop_messages = messages %}
|
||||
{% else %}
|
||||
{% set default_system = [{'role': 'system', 'content': 'You are a phonetic transcriber. Transpose only English and Denglish words into German phonetics.'}] %}
|
||||
{% set loop_messages = default_system + messages %}
|
||||
{% endif %}
|
||||
{% for message in loop_messages %}
|
||||
{% if loop.index0 == 0 %}
|
||||
{{ bos_token }}
|
||||
{% endif %}
|
||||
{{ '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n' }}
|
||||
{% if message['role'] == 'user' %}
|
||||
{{ '[DENGLISH]' + message['content'] | trim + '<|eot_id|>' }}
|
||||
{% else %}
|
||||
{{ message['content'] | trim + '<|eot_id|>' }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if add_generation_prompt %}
|
||||
{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user