bofenghuang
commited on
Commit
•
25a6f19
1
Parent(s):
615cfe6
Update tokenizr
Browse files- tokenizer_config.json +5 -4
tokenizer_config.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
"normalized": false,
|
9 |
"rstrip": false,
|
10 |
"single_word": false,
|
11 |
-
"special":
|
12 |
},
|
13 |
"1": {
|
14 |
"content": "<s>",
|
@@ -16,7 +16,7 @@
|
|
16 |
"normalized": false,
|
17 |
"rstrip": false,
|
18 |
"single_word": false,
|
19 |
-
"special":
|
20 |
},
|
21 |
"2": {
|
22 |
"content": "</s>",
|
@@ -24,11 +24,12 @@
|
|
24 |
"normalized": false,
|
25 |
"rstrip": false,
|
26 |
"single_word": false,
|
27 |
-
"special":
|
28 |
}
|
29 |
},
|
30 |
"additional_special_tokens": [],
|
31 |
"bos_token": "<s>",
|
|
|
32 |
"clean_up_tokenization_spaces": false,
|
33 |
"eos_token": "</s>",
|
34 |
"legacy": false,
|
@@ -38,7 +39,7 @@
|
|
38 |
"sp_model_kwargs": {},
|
39 |
"spaces_between_special_tokens": false,
|
40 |
"tokenizer_class": "LlamaTokenizer",
|
41 |
-
"tokenizer_file":
|
42 |
"unk_token": "<unk>",
|
43 |
"use_default_system_prompt": true
|
44 |
}
|
|
|
8 |
"normalized": false,
|
9 |
"rstrip": false,
|
10 |
"single_word": false,
|
11 |
+
"special": true
|
12 |
},
|
13 |
"1": {
|
14 |
"content": "<s>",
|
|
|
16 |
"normalized": false,
|
17 |
"rstrip": false,
|
18 |
"single_word": false,
|
19 |
+
"special": true
|
20 |
},
|
21 |
"2": {
|
22 |
"content": "</s>",
|
|
|
24 |
"normalized": false,
|
25 |
"rstrip": false,
|
26 |
"single_word": false,
|
27 |
+
"special": true
|
28 |
}
|
29 |
},
|
30 |
"additional_special_tokens": [],
|
31 |
"bos_token": "<s>",
|
32 |
+
"chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif true == true and not '<<SYS>>' in messages[0]['content'] %}{% set loop_messages = messages %}{% set system_message = 'Vous êtes Vigogne, un assistant IA créé par Zaion Lab. Vous suivez extrêmement bien les instructions. Aidez autant que vous le pouvez.' %}{% 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' %}{{ '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'system' %}{{ '<<SYS>>\\n' + content.strip() + '\\n<</SYS>>\\n\\n' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}",
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
"legacy": false,
|
|
|
39 |
"sp_model_kwargs": {},
|
40 |
"spaces_between_special_tokens": false,
|
41 |
"tokenizer_class": "LlamaTokenizer",
|
42 |
+
"tokenizer_file": null,
|
43 |
"unk_token": "<unk>",
|
44 |
"use_default_system_prompt": true
|
45 |
}
|