Fix chat template to add generation prompt only if the option is selected (#9)
- Fix chat template to add generation prompt only if the option is selected (a8e4780a4e78247711e28fdf3603cef715d2d4c7) Co-authored-by: Arka Pal <ArkaAbacus@users.noreply.huggingface.co>
This commit is contained in:
parent
d3aa29f914
commit
237acf7d79
@ -2050,7 +2050,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bos_token": "<|begin_of_text|>",
|
"bos_token": "<|begin_of_text|>",
|
||||||
"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}",
|
"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}{% endif %}",
|
||||||
"clean_up_tokenization_spaces": true,
|
"clean_up_tokenization_spaces": true,
|
||||||
"eos_token": "<|end_of_text|>",
|
"eos_token": "<|end_of_text|>",
|
||||||
"model_input_names": [
|
"model_input_names": [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user