Add chat template
Browse files- tokenizer_config.json +3 -2
tokenizer_config.json
CHANGED
@@ -44,6 +44,7 @@
|
|
44 |
"tokenizer_class": "LlamaTokenizer",
|
45 |
"trust_remote_code": false,
|
46 |
"unk_token": "<unk>",
|
47 |
-
"use_default_system_prompt":
|
48 |
-
"use_fast": true
|
|
|
49 |
}
|
|
|
44 |
"tokenizer_class": "LlamaTokenizer",
|
45 |
"trust_remote_code": false,
|
46 |
"unk_token": "<unk>",
|
47 |
+
"use_default_system_prompt": false,
|
48 |
+
"use_fast": true,
|
49 |
+
"chat_template": "{%- set ns = namespace(found=false) -%}{%- for message in messages -%}{%- if message['role'] == 'system' -%}{%- set ns.found = true -%}{%- endif -%}{%- endfor -%}{%- if not ns.found -%}{{- '### System:\n' + 'You are a medical assistant, provide accurate and unbiased answers to the questions.' + '\n\n' -}}{%- endif %}{%- for message in messages %}{%- if message['role'] == 'system' -%}{{- '### System:\n' + message['content'] + '\n\n' -}}{%- else -%}{%- if message['role'] == 'user' -%}{{-'### Instruction:\n' + message['content'] + '\n\n'-}}{%- else -%}{{-'### Response:\n' + message['content'] + '\n\n' -}}{%- endif -%}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%}{{-'### Response:\n'-}}{%- endif -%}"
|
50 |
}
|