fix tokenization for chatml
Browse files- config.json +1 -1
- tokenizer_config.json +7 -7
config.json
CHANGED
|
@@ -20,6 +20,6 @@
|
|
| 20 |
"tie_word_embeddings": false,
|
| 21 |
"torch_dtype": "bfloat16",
|
| 22 |
"transformers_version": "4.34.0.dev0",
|
| 23 |
-
"use_cache":
|
| 24 |
"vocab_size": 32002
|
| 25 |
}
|
|
|
|
| 20 |
"tie_word_embeddings": false,
|
| 21 |
"torch_dtype": "bfloat16",
|
| 22 |
"transformers_version": "4.34.0.dev0",
|
| 23 |
+
"use_cache": true,
|
| 24 |
"vocab_size": 32002
|
| 25 |
}
|
tokenizer_config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"add_bos_token":
|
| 3 |
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
|
@@ -32,28 +32,28 @@
|
|
| 32 |
"normalized": false,
|
| 33 |
"rstrip": false,
|
| 34 |
"single_word": false,
|
| 35 |
-
"special":
|
| 36 |
},
|
| 37 |
"32001": {
|
| 38 |
"content": "<|im_start|>",
|
| 39 |
-
"lstrip":
|
| 40 |
"normalized": false,
|
| 41 |
-
"rstrip":
|
| 42 |
"single_word": false,
|
| 43 |
-
"special":
|
| 44 |
}
|
| 45 |
},
|
| 46 |
"additional_special_tokens": [],
|
| 47 |
"bos_token": "<s>",
|
|
|
|
| 48 |
"clean_up_tokenization_spaces": false,
|
| 49 |
-
"eos_token": "
|
| 50 |
"legacy": true,
|
| 51 |
"model_max_length": 1000000000000000019884624838656,
|
| 52 |
"pad_token": null,
|
| 53 |
"sp_model_kwargs": {},
|
| 54 |
"spaces_between_special_tokens": false,
|
| 55 |
"tokenizer_class": "LlamaTokenizer",
|
| 56 |
-
"tokenizer_file": "/workspace/data/huggingface-cache/hub/models--mistralai--Mistral-7B-v0.1/snapshots/ae9d75c6b4eb39515def78c685fb4d71d49fc2cf/tokenizer.json",
|
| 57 |
"trust_remote_code": false,
|
| 58 |
"unk_token": "<unk>",
|
| 59 |
"use_default_system_prompt": true,
|
|
|
|
| 1 |
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
|
|
|
| 32 |
"normalized": false,
|
| 33 |
"rstrip": false,
|
| 34 |
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
},
|
| 37 |
"32001": {
|
| 38 |
"content": "<|im_start|>",
|
| 39 |
+
"lstrip": true,
|
| 40 |
"normalized": false,
|
| 41 |
+
"rstrip": true,
|
| 42 |
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
}
|
| 45 |
},
|
| 46 |
"additional_special_tokens": [],
|
| 47 |
"bos_token": "<s>",
|
| 48 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 49 |
"clean_up_tokenization_spaces": false,
|
| 50 |
+
"eos_token": "<|im_end|>",
|
| 51 |
"legacy": true,
|
| 52 |
"model_max_length": 1000000000000000019884624838656,
|
| 53 |
"pad_token": null,
|
| 54 |
"sp_model_kwargs": {},
|
| 55 |
"spaces_between_special_tokens": false,
|
| 56 |
"tokenizer_class": "LlamaTokenizer",
|
|
|
|
| 57 |
"trust_remote_code": false,
|
| 58 |
"unk_token": "<unk>",
|
| 59 |
"use_default_system_prompt": true,
|