Luigi commited on
Commit
ebfdc39
·
verified ·
1 Parent(s): 16d38dd

Upload tokenizer

Browse files
Files changed (2) hide show
  1. special_tokens_map.json +25 -3
  2. tokenizer_config.json +9 -3
special_tokens_map.json CHANGED
@@ -1,6 +1,28 @@
1
  {
2
- "bos_token": "<|im_start|>",
3
- "eos_token": "<|im_end|>",
4
- "pad_token": "<|PAD_TOKEN|>",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "unk_token": "�"
6
  }
 
1
  {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "<|im_start|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "eos_token": {
14
+ "content": "<|im_end|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "pad_token": {
21
+ "content": "<|PAD_TOKEN|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
  "unk_token": "�"
28
  }
tokenizer_config.json CHANGED
@@ -154,13 +154,19 @@
154
  "special": true
155
  }
156
  },
 
 
 
 
157
  "bos_token": "<|im_start|>",
158
- "chat_template": "{% if 'role' in messages[0] %}{% for message in messages %}{% if message['role'] == 'user' %}{{'<|im_start|>user\n' + message['content'] + '<|im_end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|im_start|>assistant\n' + message['content'] + '<|im_end|>\n' }}{% else %}{{ '<|im_start|>system\n' + message['content'] + '<|im_end|>\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}{% else %}{% for message in messages %}{% if message['from'] == 'human' %}{{'<|im_start|>user\n' + message['value'] + '<|im_end|>\n'}}{% elif message['from'] == 'gpt' %}{{'<|im_start|>assistant\n' + message['value'] + '<|im_end|>\n' }}{% else %}{{ '<|im_start|>system\n' + message['value'] + '<|im_end|>\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}{% endif %}",
159
  "clean_up_tokenization_spaces": false,
160
  "eos_token": "<|im_end|>",
161
  "extra_special_tokens": {},
162
- "model_max_length": 1000000000000000019884624838656,
163
  "pad_token": "<|PAD_TOKEN|>",
 
164
  "tokenizer_class": "GPT2Tokenizer",
165
- "unk_token": "�"
 
166
  }
 
154
  "special": true
155
  }
156
  },
157
+ "additional_special_tokens": [
158
+ "<|im_start|>",
159
+ "<|im_end|>"
160
+ ],
161
  "bos_token": "<|im_start|>",
162
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
163
  "clean_up_tokenization_spaces": false,
164
  "eos_token": "<|im_end|>",
165
  "extra_special_tokens": {},
166
+ "model_max_length": 8192,
167
  "pad_token": "<|PAD_TOKEN|>",
168
+ "padding_side": "left",
169
  "tokenizer_class": "GPT2Tokenizer",
170
+ "unk_token": "�",
171
+ "vocab_size": 49152
172
  }