Jihyung Moon badaoui HF Staff commited on
Commit
b6b4c36
·
verified ·
1 Parent(s): 5fe1f0c

Add Neuron-optimized model files (#2)

Browse files

- Add Neuron-optimized model files (4fdb0a5ceb6fe5f8ddfaf4c5931236cbb72f64e8)


Co-authored-by: ABDENNACER BADAOUI <[email protected]>

Files changed (7) hide show
  1. .gitattributes +1 -0
  2. README.md +5 -4
  3. config.json +37 -3
  4. model.neuron +3 -0
  5. special_tokens_map.json +49 -7
  6. tokenizer.json +85 -23
  7. tokenizer_config.json +54 -10
.gitattributes CHANGED
@@ -15,3 +15,4 @@
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
  model.safetensors filter=lfs diff=lfs merge=lfs -text
 
 
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
  model.safetensors filter=lfs diff=lfs merge=lfs -text
18
+ model.neuron filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,11 +1,12 @@
1
  ---
2
  language: ko
3
  tags:
4
- - korean
5
- - klue
6
- mask_token: "[MASK]"
 
7
  widget:
8
- - text: 대한민국의 수도는 [MASK] 입니다.
9
  ---
10
 
11
  # KLUE RoBERTa small
 
1
  ---
2
  language: ko
3
  tags:
4
+ - korean
5
+ - klue
6
+ - neuron
7
+ mask_token: '[MASK]'
8
  widget:
9
+ - text: 대한민국의 수도는 [MASK] 입니다.
10
  ---
11
 
12
  # KLUE RoBERTa small
config.json CHANGED
@@ -1,7 +1,11 @@
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",
@@ -12,10 +16,40 @@
12
  "layer_norm_eps": 1e-05,
13
  "max_position_embeddings": 514,
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
  }
 
1
  {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "RobertaForMaskedLM"
5
+ ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
  "eos_token_id": 2,
10
  "gradient_checkpointing": false,
11
  "hidden_act": "gelu",
 
16
  "layer_norm_eps": 1e-05,
17
  "max_position_embeddings": 514,
18
  "model_type": "roberta",
19
+ "neuron": {
20
+ "auto_cast": null,
21
+ "auto_cast_type": null,
22
+ "compiler_type": "neuronx-cc",
23
+ "compiler_version": "2.19.8089.0+8ab9f450",
24
+ "disable_fallback": false,
25
+ "disable_fast_relayout": false,
26
+ "dynamic_batch_size": false,
27
+ "inline_weights_to_neff": true,
28
+ "input_names": [
29
+ "input_ids",
30
+ "attention_mask"
31
+ ],
32
+ "model_type": "roberta",
33
+ "optlevel": "2",
34
+ "output_attentions": false,
35
+ "output_hidden_states": false,
36
+ "output_names": [
37
+ "logits"
38
+ ],
39
+ "static_batch_size": 1,
40
+ "static_sequence_length": 128,
41
+ "task": "fill-mask",
42
+ "tensor_parallel_size": 1
43
+ },
44
  "num_attention_heads": 12,
45
  "num_hidden_layers": 6,
46
  "pad_token_id": 1,
47
+ "position_embedding_type": "absolute",
48
+ "tokenizer_class": "BertTokenizer",
49
+ "torch_dtype": "float32",
50
+ "torchscript": true,
51
+ "transformers_version": "4.51.3",
52
  "type_vocab_size": 1,
53
+ "use_cache": true,
54
+ "vocab_size": 32000
55
  }
model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1a9b1bb1c2999b593c67ca7ff1fa1a32dddcf0df9900e676dcecc73081e7ea4
3
+ size 233266810
special_tokens_map.json CHANGED
@@ -1,9 +1,51 @@
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
  }
 
1
  {
2
+ "bos_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "[CLS]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "[SEP]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "[MASK]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "[PAD]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "[SEP]",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
  }
tokenizer.json CHANGED
@@ -5,48 +5,48 @@
5
  "added_tokens": [
6
  {
7
  "id": 0,
8
- "special": true,
9
  "content": "[CLS]",
10
  "single_word": false,
11
  "lstrip": false,
12
  "rstrip": false,
13
- "normalized": false
 
14
  },
15
  {
16
  "id": 1,
17
- "special": true,
18
  "content": "[PAD]",
19
  "single_word": false,
20
  "lstrip": false,
21
  "rstrip": false,
22
- "normalized": false
 
23
  },
24
  {
25
  "id": 2,
26
- "special": true,
27
  "content": "[SEP]",
28
  "single_word": false,
29
  "lstrip": false,
30
  "rstrip": false,
31
- "normalized": false
 
32
  },
33
  {
34
  "id": 3,
35
- "special": true,
36
  "content": "[UNK]",
37
  "single_word": false,
38
  "lstrip": false,
39
  "rstrip": false,
40
- "normalized": false
 
41
  },
42
  {
43
  "id": 4,
44
- "special": true,
45
  "content": "[MASK]",
46
  "single_word": false,
47
  "lstrip": false,
48
  "rstrip": false,
49
- "normalized": false
 
50
  }
51
  ],
52
  "normalizer": {
@@ -56,27 +56,89 @@
56
  "strip_accents": null,
57
  "lowercase": false
58
  },
59
- "pre_tokenizer": { "type": "BertPreTokenizer" },
 
 
60
  "post_processor": {
61
  "type": "TemplateProcessing",
62
  "single": [
63
- { "SpecialToken": { "id": "[CLS]", "type_id": 0 } },
64
- { "Sequence": { "id": "A", "type_id": 0 } },
65
- { "SpecialToken": { "id": "[SEP]", "type_id": 0 } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ],
67
  "pair": [
68
- { "SpecialToken": { "id": "[CLS]", "type_id": 0 } },
69
- { "Sequence": { "id": "A", "type_id": 0 } },
70
- { "SpecialToken": { "id": "[SEP]", "type_id": 0 } },
71
- { "Sequence": { "id": "B", "type_id": 0 } },
72
- { "SpecialToken": { "id": "[SEP]", "type_id": 0 } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ],
74
  "special_tokens": {
75
- "[CLS]": { "id": "[CLS]", "ids": [0], "tokens": ["[CLS]"] },
76
- "[SEP]": { "id": "[SEP]", "ids": [2], "tokens": ["[SEP]"] }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
  },
79
- "decoder": { "type": "WordPiece", "prefix": "##", "cleanup": true },
 
 
 
 
80
  "model": {
81
  "type": "WordPiece",
82
  "unk_token": "[UNK]",
@@ -32085,4 +32147,4 @@
32085
  "[unused499]": 31999
32086
  }
32087
  }
32088
- }
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
8
  "content": "[CLS]",
9
  "single_word": false,
10
  "lstrip": false,
11
  "rstrip": false,
12
+ "normalized": false,
13
+ "special": true
14
  },
15
  {
16
  "id": 1,
 
17
  "content": "[PAD]",
18
  "single_word": false,
19
  "lstrip": false,
20
  "rstrip": false,
21
+ "normalized": false,
22
+ "special": true
23
  },
24
  {
25
  "id": 2,
 
26
  "content": "[SEP]",
27
  "single_word": false,
28
  "lstrip": false,
29
  "rstrip": false,
30
+ "normalized": false,
31
+ "special": true
32
  },
33
  {
34
  "id": 3,
 
35
  "content": "[UNK]",
36
  "single_word": false,
37
  "lstrip": false,
38
  "rstrip": false,
39
+ "normalized": false,
40
+ "special": true
41
  },
42
  {
43
  "id": 4,
 
44
  "content": "[MASK]",
45
  "single_word": false,
46
  "lstrip": false,
47
  "rstrip": false,
48
+ "normalized": false,
49
+ "special": true
50
  }
51
  ],
52
  "normalizer": {
 
56
  "strip_accents": null,
57
  "lowercase": false
58
  },
59
+ "pre_tokenizer": {
60
+ "type": "BertPreTokenizer"
61
+ },
62
  "post_processor": {
63
  "type": "TemplateProcessing",
64
  "single": [
65
+ {
66
+ "SpecialToken": {
67
+ "id": "[CLS]",
68
+ "type_id": 0
69
+ }
70
+ },
71
+ {
72
+ "Sequence": {
73
+ "id": "A",
74
+ "type_id": 0
75
+ }
76
+ },
77
+ {
78
+ "SpecialToken": {
79
+ "id": "[SEP]",
80
+ "type_id": 0
81
+ }
82
+ }
83
  ],
84
  "pair": [
85
+ {
86
+ "SpecialToken": {
87
+ "id": "[CLS]",
88
+ "type_id": 0
89
+ }
90
+ },
91
+ {
92
+ "Sequence": {
93
+ "id": "A",
94
+ "type_id": 0
95
+ }
96
+ },
97
+ {
98
+ "SpecialToken": {
99
+ "id": "[SEP]",
100
+ "type_id": 0
101
+ }
102
+ },
103
+ {
104
+ "Sequence": {
105
+ "id": "B",
106
+ "type_id": 0
107
+ }
108
+ },
109
+ {
110
+ "SpecialToken": {
111
+ "id": "[SEP]",
112
+ "type_id": 0
113
+ }
114
+ }
115
  ],
116
  "special_tokens": {
117
+ "[CLS]": {
118
+ "id": "[CLS]",
119
+ "ids": [
120
+ 0
121
+ ],
122
+ "tokens": [
123
+ "[CLS]"
124
+ ]
125
+ },
126
+ "[SEP]": {
127
+ "id": "[SEP]",
128
+ "ids": [
129
+ 2
130
+ ],
131
+ "tokens": [
132
+ "[SEP]"
133
+ ]
134
+ }
135
  }
136
  },
137
+ "decoder": {
138
+ "type": "WordPiece",
139
+ "prefix": "##",
140
+ "cleanup": true
141
+ },
142
  "model": {
143
  "type": "WordPiece",
144
  "unk_token": "[UNK]",
 
32147
  "[unused499]": 31999
32148
  }
32149
  }
32150
+ }
tokenizer_config.json CHANGED
@@ -1,16 +1,60 @@
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
- "tokenizer_class": "BertTokenizer"
 
16
  }
 
1
  {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[CLS]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[PAD]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[SEP]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": false,
46
+ "cls_token": "[CLS]",
47
  "do_basic_tokenize": true,
48
+ "do_lower_case": false,
49
+ "eos_token": "[SEP]",
50
+ "extra_special_tokens": {},
51
+ "mask_token": "[MASK]",
52
+ "model_max_length": 512,
53
  "never_split": null,
 
 
54
  "pad_token": "[PAD]",
55
+ "sep_token": "[SEP]",
 
 
 
 
56
  "strip_accents": null,
57
+ "tokenize_chinese_chars": true,
58
+ "tokenizer_class": "BertTokenizer",
59
+ "unk_token": "[UNK]"
60
  }