monologg commited on
Commit
7901f13
1 Parent(s): 0ac8348

fix: several issues

Browse files

* change special token location on vocab.txt
* add bos_token & eos_token

Files changed (4) hide show
  1. config.json +20 -22
  2. special_tokens_map.json +9 -1
  3. tokenizer_config.json +14 -12
  4. vocab.txt +2 -2
config.json CHANGED
@@ -1,23 +1,21 @@
1
  {
2
- "architectures": [
3
- "RobertaForMaskedLM"
4
- ],
5
- "attention_probs_dropout_prob": 0.1,
6
- "bos_token_id": 0,
7
- "eos_token_id": 2,
8
- "gradient_checkpointing": false,
9
- "hidden_act": "gelu",
10
- "hidden_dropout_prob": 0.1,
11
- "hidden_size": 768,
12
- "initializer_range": 0.02,
13
- "intermediate_size": 3072,
14
- "layer_norm_eps": 1e-05,
15
- "max_position_embeddings": 512,
16
- "model_type": "roberta",
17
- "num_attention_heads": 12,
18
- "num_hidden_layers": 6,
19
- "pad_token_id": 1,
20
- "type_vocab_size": 1,
21
- "vocab_size": 32000,
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": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-05,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "roberta",
15
+ "num_attention_heads": 12,
16
+ "num_hidden_layers": 6,
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
- {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
 
 
 
 
 
 
 
 
 
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
- "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
- "tokenize_chinese_chars": true,
11
- "strip_accents": null,
12
- "model_max_length": 512
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
  "