yentinglin
commited on
Commit
•
0c6b19e
1
Parent(s):
bc05d16
Upload tokenizer
Browse files- special_tokens_map.json +28 -9
- tokenizer.model +3 -0
- tokenizer_config.json +6 -7
special_tokens_map.json
CHANGED
@@ -1,11 +1,30 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"<
|
4 |
-
"
|
5 |
-
"
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
"
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
|
|
1 |
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<unk>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
}
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
tokenizer_config.json
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
{
|
|
|
|
|
2 |
"added_tokens_decoder": {
|
3 |
"0": {
|
4 |
"content": "<unk>",
|
@@ -25,19 +27,16 @@
|
|
25 |
"special": true
|
26 |
}
|
27 |
},
|
28 |
-
"additional_special_tokens": [
|
29 |
-
"<unk>",
|
30 |
-
"<s>",
|
31 |
-
"</s>"
|
32 |
-
],
|
33 |
"bos_token": "<s>",
|
|
|
34 |
"clean_up_tokenization_spaces": false,
|
35 |
"eos_token": "</s>",
|
36 |
"legacy": false,
|
37 |
-
"model_max_length":
|
38 |
-
"pad_token": "
|
39 |
"padding_side": "right",
|
40 |
"sp_model_kwargs": {},
|
|
|
41 |
"tokenizer_class": "LlamaTokenizer",
|
42 |
"unk_token": "<unk>",
|
43 |
"use_default_system_prompt": true
|
|
|
1 |
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
6 |
"content": "<unk>",
|
|
|
27 |
"special": true
|
28 |
}
|
29 |
},
|
|
|
|
|
|
|
|
|
|
|
30 |
"bos_token": "<s>",
|
31 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'].strip() %}{% else %}{% set loop_messages = messages %}{% set system_message = '你是人工智慧助理,以下是用戶和人工智能助理之間的對話。你要對用戶的問題提供有用、安全、詳細和禮貌的回答。' %}{% endif %}{{system_message + eos_token}}{% for message in loop_messages %}{% if message['role'] == 'user' %}USER: {{ message['content'].strip() + eos_token }}{% elif message['role'] == 'system' %}{{message['content'].strip() + eos_token}}{% elif message['role'] == 'assistant' %}ASSISTANT: {{ message['content'].strip() + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{'ASSISTANT:'}}{% endif %}",
|
32 |
"clean_up_tokenization_spaces": false,
|
33 |
"eos_token": "</s>",
|
34 |
"legacy": false,
|
35 |
+
"model_max_length": 1024,
|
36 |
+
"pad_token": "<unk>",
|
37 |
"padding_side": "right",
|
38 |
"sp_model_kwargs": {},
|
39 |
+
"spaces_between_special_tokens": false,
|
40 |
"tokenizer_class": "LlamaTokenizer",
|
41 |
"unk_token": "<unk>",
|
42 |
"use_default_system_prompt": true
|