fix: several issues
Browse files* change special token location on vocab.txt
* add bos_token & eos_token
- config.json +20 -22
- special_tokens_map.json +9 -1
- tokenizer_config.json +14 -12
- vocab.txt +2 -2
config.json
CHANGED
@@ -1,23 +1,21 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
"tokenizer_class": "BertTokenizer"
|
23 |
-
}
|
|
|
1 |
{
|
2 |
+
"architectures": ["RobertaForMaskedLM"],
|
3 |
+
"attention_probs_dropout_prob": 0.1,
|
4 |
+
"bos_token_id": 0,
|
5 |
+
"eos_token_id": 2,
|
6 |
+
"gradient_checkpointing": false,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"initializer_range": 0.02,
|
11 |
+
"intermediate_size": 4096,
|
12 |
+
"layer_norm_eps": 1e-05,
|
13 |
+
"max_position_embeddings": 512,
|
14 |
+
"model_type": "roberta",
|
15 |
+
"num_attention_heads": 16,
|
16 |
+
"num_hidden_layers": 24,
|
17 |
+
"pad_token_id": 1,
|
18 |
+
"type_vocab_size": 1,
|
19 |
+
"vocab_size": 32000,
|
20 |
+
"tokenizer_class": "BertTokenizer"
|
21 |
+
}
|
|
|
|
special_tokens_map.json
CHANGED
@@ -1 +1,9 @@
|
|
1 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"unk_token": "[UNK]",
|
3 |
+
"sep_token": "[SEP]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"cls_token": "[CLS]",
|
6 |
+
"mask_token": "[MASK]",
|
7 |
+
"bos_token": "[CLS]",
|
8 |
+
"eos_token": "[SEP]"
|
9 |
+
}
|
tokenizer_config.json
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
1 |
{
|
2 |
+
"do_lower_case": false,
|
3 |
+
"do_basic_tokenize": true,
|
4 |
+
"never_split": null,
|
5 |
+
"unk_token": "[UNK]",
|
6 |
+
"sep_token": "[SEP]",
|
7 |
+
"pad_token": "[PAD]",
|
8 |
+
"cls_token": "[CLS]",
|
9 |
+
"mask_token": "[MASK]",
|
10 |
+
"bos_token": "[CLS]",
|
11 |
+
"eos_token": "[SEP]",
|
12 |
+
"tokenize_chinese_chars": true,
|
13 |
+
"strip_accents": null,
|
14 |
+
"model_max_length": 512
|
15 |
+
}
|
vocab.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
[PAD]
|
2 |
-
[UNK]
|
3 |
[CLS]
|
|
|
4 |
[SEP]
|
|
|
5 |
[MASK]
|
6 |
!
|
7 |
"
|
|
|
|
|
|
|
1 |
[CLS]
|
2 |
+
[PAD]
|
3 |
[SEP]
|
4 |
+
[UNK]
|
5 |
[MASK]
|
6 |
!
|
7 |
"
|