maximegmd commited on
Commit
5bce421
1 Parent(s): 99289a9

Add chat template

Browse files
Files changed (1) hide show
  1. 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": true,
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
  }