philschmid HF staff commited on
Commit
a6be08b
1 Parent(s): ea07891

add template

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +7 -4
tokenizer_config.json CHANGED
@@ -5,29 +5,32 @@
5
  "__type": "AddedToken",
6
  "content": "<s>",
7
  "lstrip": false,
8
- "normalized": true,
9
  "rstrip": false,
10
  "single_word": false
11
  },
 
12
  "clean_up_tokenization_spaces": false,
13
  "eos_token": {
14
  "__type": "AddedToken",
15
  "content": "</s>",
16
  "lstrip": false,
17
- "normalized": true,
18
  "rstrip": false,
19
  "single_word": false
20
  },
 
21
  "model_max_length": 1000000000000000019884624838656,
22
  "pad_token": null,
 
23
  "sp_model_kwargs": {},
24
  "tokenizer_class": "LlamaTokenizer",
25
  "unk_token": {
26
  "__type": "AddedToken",
27
  "content": "<unk>",
28
  "lstrip": false,
29
- "normalized": true,
30
  "rstrip": false,
31
  "single_word": false
32
  }
33
- }
 
5
  "__type": "AddedToken",
6
  "content": "<s>",
7
  "lstrip": false,
8
+ "normalized": false,
9
  "rstrip": false,
10
  "single_word": false
11
  },
12
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}",
13
  "clean_up_tokenization_spaces": false,
14
  "eos_token": {
15
  "__type": "AddedToken",
16
  "content": "</s>",
17
  "lstrip": false,
18
+ "normalized": false,
19
  "rstrip": false,
20
  "single_word": false
21
  },
22
+ "legacy": false,
23
  "model_max_length": 1000000000000000019884624838656,
24
  "pad_token": null,
25
+ "padding_side": "right",
26
  "sp_model_kwargs": {},
27
  "tokenizer_class": "LlamaTokenizer",
28
  "unk_token": {
29
  "__type": "AddedToken",
30
  "content": "<unk>",
31
  "lstrip": false,
32
+ "normalized": false,
33
  "rstrip": false,
34
  "single_word": false
35
  }
36
+ }