KoichiYasuoka commited on
Commit
e62a0a0
1 Parent(s): e347512

initial release

Browse files
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - "ja"
4
+ tags:
5
+ - "japanese"
6
+ - "pos"
7
+ - "dependency-parsing"
8
+ base_model: rinna/japanese-gpt-1b
9
+ datasets:
10
+ - "universal_dependencies"
11
+ license: "mit"
12
+ pipeline_tag: "token-classification"
13
+ widget:
14
+ - text: "全学年にわたって小学校の国語の教科書に挿し絵が用いられている"
15
+ ---
16
+
17
+ # rinna-gpt2-1b-japanese-ud-causal
18
+
19
+ ## Model Description
20
+
21
+ This is a GPT-2 model pretrained for POS-tagging and dependency-parsing, derived from [japanese-gpt-1b](https://huggingface.co/rinna/japanese-gpt-1b) refined for [UD_Japanese-GSDLUW](https://github.com/UniversalDependencies/UD_Japanese-GSDLUW).
22
+
23
+ ## How to Use
24
+
25
+ ```
26
+ from transformers import pipeline
27
+ nlp=pipeline("universal-dependencies","KoichiYasuoka/rinna-gpt2-1b-japanese-ud-causal",trust_remote_code=True)
28
+ print(nlp("全学年にわたって小学校の国語の教科書に挿し絵が用いられている"))
29
+ ```
30
+
config.json ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "gelu_fast",
3
+ "architectures": [
4
+ "GPT2ForTokenClassification"
5
+ ],
6
+ "attn_pdrop": 0.1,
7
+ "bos_token_id": 2,
8
+ "custom_pipelines": {
9
+ "upos": {
10
+ "impl": "ud.BellmanFordTokenClassificationPipeline",
11
+ "pt": "AutoModelForTokenClassification"
12
+ },
13
+ "universal-dependencies": {
14
+ "impl": "ud.UniversalDependenciesCausalPipeline",
15
+ "pt": "AutoModelForTokenClassification"
16
+ }
17
+ },
18
+ "embd_pdrop": 0.1,
19
+ "eos_token_id": 3,
20
+ "gradient_checkpointing": false,
21
+ "id2label": {
22
+ "0": "ADJ",
23
+ "1": "ADJ|l-acl",
24
+ "2": "ADJ|l-advcl",
25
+ "3": "ADJ|l-amod",
26
+ "4": "ADJ|l-ccomp",
27
+ "5": "ADJ|l-csubj",
28
+ "6": "ADJ|l-csubj:outer",
29
+ "7": "ADJ|l-nmod",
30
+ "8": "ADJ|l-nsubj",
31
+ "9": "ADJ|l-obj",
32
+ "10": "ADJ|l-obl",
33
+ "11": "ADJ|r-acl",
34
+ "12": "ADJ|r-amod",
35
+ "13": "ADJ|r-dep",
36
+ "14": "ADJ|root",
37
+ "15": "ADP",
38
+ "16": "ADP|l-case",
39
+ "17": "ADP|r-case",
40
+ "18": "ADP|r-fixed",
41
+ "19": "ADV",
42
+ "20": "ADV|l-advcl",
43
+ "21": "ADV|l-advmod",
44
+ "22": "ADV|l-obj",
45
+ "23": "ADV|r-dep",
46
+ "24": "ADV|root",
47
+ "25": "AUX",
48
+ "26": "AUX|Polarity=Neg",
49
+ "27": "AUX|Polarity=Neg|r-aux",
50
+ "28": "AUX|Polarity=Neg|r-fixed",
51
+ "29": "AUX|r-aux",
52
+ "30": "AUX|r-cop",
53
+ "31": "AUX|r-fixed",
54
+ "32": "AUX|root",
55
+ "33": "B-ADJ",
56
+ "34": "B-ADP",
57
+ "35": "B-ADV",
58
+ "36": "B-AUX",
59
+ "37": "B-AUX|Polarity=Neg",
60
+ "38": "B-CCONJ",
61
+ "39": "B-DET",
62
+ "40": "B-INTJ",
63
+ "41": "B-NOUN",
64
+ "42": "B-NOUN|Polarity=Neg",
65
+ "43": "B-NUM",
66
+ "44": "B-PART",
67
+ "45": "B-PRON",
68
+ "46": "B-PROPN",
69
+ "47": "B-PUNCT",
70
+ "48": "B-SCONJ",
71
+ "49": "B-SYM",
72
+ "50": "B-VERB",
73
+ "51": "B-X",
74
+ "52": "CCONJ",
75
+ "53": "CCONJ|l-cc",
76
+ "54": "CCONJ|r-cc",
77
+ "55": "DET",
78
+ "56": "DET|l-det",
79
+ "57": "I-ADJ",
80
+ "58": "I-ADP",
81
+ "59": "I-ADV",
82
+ "60": "I-AUX",
83
+ "61": "I-AUX|Polarity=Neg",
84
+ "62": "I-CCONJ",
85
+ "63": "I-DET",
86
+ "64": "I-INTJ",
87
+ "65": "I-NOUN",
88
+ "66": "I-NOUN|Polarity=Neg",
89
+ "67": "I-NUM",
90
+ "68": "I-PART",
91
+ "69": "I-PRON",
92
+ "70": "I-PROPN",
93
+ "71": "I-PUNCT",
94
+ "72": "I-SCONJ",
95
+ "73": "I-SYM",
96
+ "74": "I-VERB",
97
+ "75": "I-X",
98
+ "76": "INTJ",
99
+ "77": "INTJ|l-discourse",
100
+ "78": "INTJ|r-discourse",
101
+ "79": "INTJ|root",
102
+ "80": "NOUN",
103
+ "81": "NOUN|Polarity=Neg",
104
+ "82": "NOUN|Polarity=Neg|l-obl",
105
+ "83": "NOUN|Polarity=Neg|root",
106
+ "84": "NOUN|l-acl",
107
+ "85": "NOUN|l-advcl",
108
+ "86": "NOUN|l-ccomp",
109
+ "87": "NOUN|l-compound",
110
+ "88": "NOUN|l-csubj",
111
+ "89": "NOUN|l-csubj:outer",
112
+ "90": "NOUN|l-nmod",
113
+ "91": "NOUN|l-nsubj",
114
+ "92": "NOUN|l-nsubj:outer",
115
+ "93": "NOUN|l-obj",
116
+ "94": "NOUN|l-obl",
117
+ "95": "NOUN|r-compound",
118
+ "96": "NOUN|r-nmod",
119
+ "97": "NOUN|r-nsubj",
120
+ "98": "NOUN|root",
121
+ "99": "NUM",
122
+ "100": "NUM|l-advcl",
123
+ "101": "NUM|l-compound",
124
+ "102": "NUM|l-nmod",
125
+ "103": "NUM|l-nsubj",
126
+ "104": "NUM|l-nsubj:outer",
127
+ "105": "NUM|l-nummod",
128
+ "106": "NUM|l-obj",
129
+ "107": "NUM|l-obl",
130
+ "108": "NUM|r-compound",
131
+ "109": "NUM|root",
132
+ "110": "PART",
133
+ "111": "PART|l-mark",
134
+ "112": "PART|r-mark",
135
+ "113": "PRON",
136
+ "114": "PRON|l-acl",
137
+ "115": "PRON|l-advcl",
138
+ "116": "PRON|l-nmod",
139
+ "117": "PRON|l-nsubj",
140
+ "118": "PRON|l-nsubj:outer",
141
+ "119": "PRON|l-obj",
142
+ "120": "PRON|l-obl",
143
+ "121": "PRON|root",
144
+ "122": "PROPN",
145
+ "123": "PROPN|l-acl",
146
+ "124": "PROPN|l-advcl",
147
+ "125": "PROPN|l-compound",
148
+ "126": "PROPN|l-nmod",
149
+ "127": "PROPN|l-nsubj",
150
+ "128": "PROPN|l-nsubj:outer",
151
+ "129": "PROPN|l-obj",
152
+ "130": "PROPN|l-obl",
153
+ "131": "PROPN|r-compound",
154
+ "132": "PROPN|r-nmod",
155
+ "133": "PROPN|root",
156
+ "134": "PUNCT",
157
+ "135": "PUNCT|l-punct",
158
+ "136": "PUNCT|r-punct",
159
+ "137": "SCONJ",
160
+ "138": "SCONJ|l-dep",
161
+ "139": "SCONJ|r-fixed",
162
+ "140": "SCONJ|r-mark",
163
+ "141": "SYM",
164
+ "142": "SYM|l-compound",
165
+ "143": "SYM|l-dep",
166
+ "144": "SYM|l-nmod",
167
+ "145": "SYM|l-obl",
168
+ "146": "SYM|r-compound",
169
+ "147": "SYM|r-dep",
170
+ "148": "VERB",
171
+ "149": "VERB|l-acl",
172
+ "150": "VERB|l-advcl",
173
+ "151": "VERB|l-ccomp",
174
+ "152": "VERB|l-compound",
175
+ "153": "VERB|l-csubj",
176
+ "154": "VERB|l-csubj:outer",
177
+ "155": "VERB|l-nmod",
178
+ "156": "VERB|l-obj",
179
+ "157": "VERB|l-obl",
180
+ "158": "VERB|r-acl",
181
+ "159": "VERB|r-advcl",
182
+ "160": "VERB|r-compound",
183
+ "161": "VERB|root",
184
+ "162": "X",
185
+ "163": "X|l-nmod",
186
+ "164": "X|r-dep"
187
+ },
188
+ "initializer_range": 0.02,
189
+ "label2id": {
190
+ "ADJ": 0,
191
+ "ADJ|l-acl": 1,
192
+ "ADJ|l-advcl": 2,
193
+ "ADJ|l-amod": 3,
194
+ "ADJ|l-ccomp": 4,
195
+ "ADJ|l-csubj": 5,
196
+ "ADJ|l-csubj:outer": 6,
197
+ "ADJ|l-nmod": 7,
198
+ "ADJ|l-nsubj": 8,
199
+ "ADJ|l-obj": 9,
200
+ "ADJ|l-obl": 10,
201
+ "ADJ|r-acl": 11,
202
+ "ADJ|r-amod": 12,
203
+ "ADJ|r-dep": 13,
204
+ "ADJ|root": 14,
205
+ "ADP": 15,
206
+ "ADP|l-case": 16,
207
+ "ADP|r-case": 17,
208
+ "ADP|r-fixed": 18,
209
+ "ADV": 19,
210
+ "ADV|l-advcl": 20,
211
+ "ADV|l-advmod": 21,
212
+ "ADV|l-obj": 22,
213
+ "ADV|r-dep": 23,
214
+ "ADV|root": 24,
215
+ "AUX": 25,
216
+ "AUX|Polarity=Neg": 26,
217
+ "AUX|Polarity=Neg|r-aux": 27,
218
+ "AUX|Polarity=Neg|r-fixed": 28,
219
+ "AUX|r-aux": 29,
220
+ "AUX|r-cop": 30,
221
+ "AUX|r-fixed": 31,
222
+ "AUX|root": 32,
223
+ "B-ADJ": 33,
224
+ "B-ADP": 34,
225
+ "B-ADV": 35,
226
+ "B-AUX": 36,
227
+ "B-AUX|Polarity=Neg": 37,
228
+ "B-CCONJ": 38,
229
+ "B-DET": 39,
230
+ "B-INTJ": 40,
231
+ "B-NOUN": 41,
232
+ "B-NOUN|Polarity=Neg": 42,
233
+ "B-NUM": 43,
234
+ "B-PART": 44,
235
+ "B-PRON": 45,
236
+ "B-PROPN": 46,
237
+ "B-PUNCT": 47,
238
+ "B-SCONJ": 48,
239
+ "B-SYM": 49,
240
+ "B-VERB": 50,
241
+ "B-X": 51,
242
+ "CCONJ": 52,
243
+ "CCONJ|l-cc": 53,
244
+ "CCONJ|r-cc": 54,
245
+ "DET": 55,
246
+ "DET|l-det": 56,
247
+ "I-ADJ": 57,
248
+ "I-ADP": 58,
249
+ "I-ADV": 59,
250
+ "I-AUX": 60,
251
+ "I-AUX|Polarity=Neg": 61,
252
+ "I-CCONJ": 62,
253
+ "I-DET": 63,
254
+ "I-INTJ": 64,
255
+ "I-NOUN": 65,
256
+ "I-NOUN|Polarity=Neg": 66,
257
+ "I-NUM": 67,
258
+ "I-PART": 68,
259
+ "I-PRON": 69,
260
+ "I-PROPN": 70,
261
+ "I-PUNCT": 71,
262
+ "I-SCONJ": 72,
263
+ "I-SYM": 73,
264
+ "I-VERB": 74,
265
+ "I-X": 75,
266
+ "INTJ": 76,
267
+ "INTJ|l-discourse": 77,
268
+ "INTJ|r-discourse": 78,
269
+ "INTJ|root": 79,
270
+ "NOUN": 80,
271
+ "NOUN|Polarity=Neg": 81,
272
+ "NOUN|Polarity=Neg|l-obl": 82,
273
+ "NOUN|Polarity=Neg|root": 83,
274
+ "NOUN|l-acl": 84,
275
+ "NOUN|l-advcl": 85,
276
+ "NOUN|l-ccomp": 86,
277
+ "NOUN|l-compound": 87,
278
+ "NOUN|l-csubj": 88,
279
+ "NOUN|l-csubj:outer": 89,
280
+ "NOUN|l-nmod": 90,
281
+ "NOUN|l-nsubj": 91,
282
+ "NOUN|l-nsubj:outer": 92,
283
+ "NOUN|l-obj": 93,
284
+ "NOUN|l-obl": 94,
285
+ "NOUN|r-compound": 95,
286
+ "NOUN|r-nmod": 96,
287
+ "NOUN|r-nsubj": 97,
288
+ "NOUN|root": 98,
289
+ "NUM": 99,
290
+ "NUM|l-advcl": 100,
291
+ "NUM|l-compound": 101,
292
+ "NUM|l-nmod": 102,
293
+ "NUM|l-nsubj": 103,
294
+ "NUM|l-nsubj:outer": 104,
295
+ "NUM|l-nummod": 105,
296
+ "NUM|l-obj": 106,
297
+ "NUM|l-obl": 107,
298
+ "NUM|r-compound": 108,
299
+ "NUM|root": 109,
300
+ "PART": 110,
301
+ "PART|l-mark": 111,
302
+ "PART|r-mark": 112,
303
+ "PRON": 113,
304
+ "PRON|l-acl": 114,
305
+ "PRON|l-advcl": 115,
306
+ "PRON|l-nmod": 116,
307
+ "PRON|l-nsubj": 117,
308
+ "PRON|l-nsubj:outer": 118,
309
+ "PRON|l-obj": 119,
310
+ "PRON|l-obl": 120,
311
+ "PRON|root": 121,
312
+ "PROPN": 122,
313
+ "PROPN|l-acl": 123,
314
+ "PROPN|l-advcl": 124,
315
+ "PROPN|l-compound": 125,
316
+ "PROPN|l-nmod": 126,
317
+ "PROPN|l-nsubj": 127,
318
+ "PROPN|l-nsubj:outer": 128,
319
+ "PROPN|l-obj": 129,
320
+ "PROPN|l-obl": 130,
321
+ "PROPN|r-compound": 131,
322
+ "PROPN|r-nmod": 132,
323
+ "PROPN|root": 133,
324
+ "PUNCT": 134,
325
+ "PUNCT|l-punct": 135,
326
+ "PUNCT|r-punct": 136,
327
+ "SCONJ": 137,
328
+ "SCONJ|l-dep": 138,
329
+ "SCONJ|r-fixed": 139,
330
+ "SCONJ|r-mark": 140,
331
+ "SYM": 141,
332
+ "SYM|l-compound": 142,
333
+ "SYM|l-dep": 143,
334
+ "SYM|l-nmod": 144,
335
+ "SYM|l-obl": 145,
336
+ "SYM|r-compound": 146,
337
+ "SYM|r-dep": 147,
338
+ "VERB": 148,
339
+ "VERB|l-acl": 149,
340
+ "VERB|l-advcl": 150,
341
+ "VERB|l-ccomp": 151,
342
+ "VERB|l-compound": 152,
343
+ "VERB|l-csubj": 153,
344
+ "VERB|l-csubj:outer": 154,
345
+ "VERB|l-nmod": 155,
346
+ "VERB|l-obj": 156,
347
+ "VERB|l-obl": 157,
348
+ "VERB|r-acl": 158,
349
+ "VERB|r-advcl": 159,
350
+ "VERB|r-compound": 160,
351
+ "VERB|root": 161,
352
+ "X": 162,
353
+ "X|l-nmod": 163,
354
+ "X|r-dep": 164
355
+ },
356
+ "layer_norm_epsilon": 1e-05,
357
+ "model_type": "gpt2",
358
+ "n_ctx": 1024,
359
+ "n_embd": 2048,
360
+ "n_head": 16,
361
+ "n_inner": 8192,
362
+ "n_layer": 24,
363
+ "n_positions": 1024,
364
+ "reorder_and_upcast_attn": false,
365
+ "resid_pdrop": 0.1,
366
+ "scale_attn_by_inverse_layer_idx": false,
367
+ "scale_attn_weights": true,
368
+ "summary_activation": null,
369
+ "summary_first_dropout": 0.1,
370
+ "summary_proj_to_labels": true,
371
+ "summary_type": "cls_index",
372
+ "summary_use_proj": true,
373
+ "tokenizer_class": "PreTrainedTokenizerFast",
374
+ "torch_dtype": "float32",
375
+ "transformers_version": "4.39.3",
376
+ "use_cache": true,
377
+ "vocab_size": 44928
378
+ }
pytorch_model-00001-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91039cb93e06719c95158ec2ba95280ae10d397f42bec3365252b0e277dea8d0
3
+ size 4942377882
pytorch_model-00002-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a0e0733c23ac2270146c508d8386554be0326096203db6c1f2b5d18d36aded3
3
+ size 269925550
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 5212201620
4
+ },
5
+ "weight_map": {
6
+ "classifier.bias": "pytorch_model-00002-of-00002.bin",
7
+ "classifier.weight": "pytorch_model-00002-of-00002.bin",
8
+ "transformer.h.0.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
9
+ "transformer.h.0.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
10
+ "transformer.h.0.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
11
+ "transformer.h.0.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
12
+ "transformer.h.0.ln_1.bias": "pytorch_model-00001-of-00002.bin",
13
+ "transformer.h.0.ln_1.weight": "pytorch_model-00001-of-00002.bin",
14
+ "transformer.h.0.ln_2.bias": "pytorch_model-00001-of-00002.bin",
15
+ "transformer.h.0.ln_2.weight": "pytorch_model-00001-of-00002.bin",
16
+ "transformer.h.0.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
17
+ "transformer.h.0.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
18
+ "transformer.h.0.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
19
+ "transformer.h.0.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
20
+ "transformer.h.1.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
21
+ "transformer.h.1.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
22
+ "transformer.h.1.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
23
+ "transformer.h.1.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
24
+ "transformer.h.1.ln_1.bias": "pytorch_model-00001-of-00002.bin",
25
+ "transformer.h.1.ln_1.weight": "pytorch_model-00001-of-00002.bin",
26
+ "transformer.h.1.ln_2.bias": "pytorch_model-00001-of-00002.bin",
27
+ "transformer.h.1.ln_2.weight": "pytorch_model-00001-of-00002.bin",
28
+ "transformer.h.1.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
29
+ "transformer.h.1.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
30
+ "transformer.h.1.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
31
+ "transformer.h.1.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
32
+ "transformer.h.10.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
33
+ "transformer.h.10.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
34
+ "transformer.h.10.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
35
+ "transformer.h.10.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
36
+ "transformer.h.10.ln_1.bias": "pytorch_model-00001-of-00002.bin",
37
+ "transformer.h.10.ln_1.weight": "pytorch_model-00001-of-00002.bin",
38
+ "transformer.h.10.ln_2.bias": "pytorch_model-00001-of-00002.bin",
39
+ "transformer.h.10.ln_2.weight": "pytorch_model-00001-of-00002.bin",
40
+ "transformer.h.10.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
41
+ "transformer.h.10.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
42
+ "transformer.h.10.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
43
+ "transformer.h.10.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
44
+ "transformer.h.11.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
45
+ "transformer.h.11.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
46
+ "transformer.h.11.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
47
+ "transformer.h.11.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
48
+ "transformer.h.11.ln_1.bias": "pytorch_model-00001-of-00002.bin",
49
+ "transformer.h.11.ln_1.weight": "pytorch_model-00001-of-00002.bin",
50
+ "transformer.h.11.ln_2.bias": "pytorch_model-00001-of-00002.bin",
51
+ "transformer.h.11.ln_2.weight": "pytorch_model-00001-of-00002.bin",
52
+ "transformer.h.11.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
53
+ "transformer.h.11.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
54
+ "transformer.h.11.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
55
+ "transformer.h.11.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
56
+ "transformer.h.12.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
57
+ "transformer.h.12.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
58
+ "transformer.h.12.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
59
+ "transformer.h.12.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
60
+ "transformer.h.12.ln_1.bias": "pytorch_model-00001-of-00002.bin",
61
+ "transformer.h.12.ln_1.weight": "pytorch_model-00001-of-00002.bin",
62
+ "transformer.h.12.ln_2.bias": "pytorch_model-00001-of-00002.bin",
63
+ "transformer.h.12.ln_2.weight": "pytorch_model-00001-of-00002.bin",
64
+ "transformer.h.12.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
65
+ "transformer.h.12.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
66
+ "transformer.h.12.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
67
+ "transformer.h.12.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
68
+ "transformer.h.13.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
69
+ "transformer.h.13.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
70
+ "transformer.h.13.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
71
+ "transformer.h.13.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
72
+ "transformer.h.13.ln_1.bias": "pytorch_model-00001-of-00002.bin",
73
+ "transformer.h.13.ln_1.weight": "pytorch_model-00001-of-00002.bin",
74
+ "transformer.h.13.ln_2.bias": "pytorch_model-00001-of-00002.bin",
75
+ "transformer.h.13.ln_2.weight": "pytorch_model-00001-of-00002.bin",
76
+ "transformer.h.13.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
77
+ "transformer.h.13.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
78
+ "transformer.h.13.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
79
+ "transformer.h.13.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
80
+ "transformer.h.14.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
81
+ "transformer.h.14.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
82
+ "transformer.h.14.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
83
+ "transformer.h.14.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
84
+ "transformer.h.14.ln_1.bias": "pytorch_model-00001-of-00002.bin",
85
+ "transformer.h.14.ln_1.weight": "pytorch_model-00001-of-00002.bin",
86
+ "transformer.h.14.ln_2.bias": "pytorch_model-00001-of-00002.bin",
87
+ "transformer.h.14.ln_2.weight": "pytorch_model-00001-of-00002.bin",
88
+ "transformer.h.14.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
89
+ "transformer.h.14.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
90
+ "transformer.h.14.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
91
+ "transformer.h.14.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
92
+ "transformer.h.15.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
93
+ "transformer.h.15.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
94
+ "transformer.h.15.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
95
+ "transformer.h.15.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
96
+ "transformer.h.15.ln_1.bias": "pytorch_model-00001-of-00002.bin",
97
+ "transformer.h.15.ln_1.weight": "pytorch_model-00001-of-00002.bin",
98
+ "transformer.h.15.ln_2.bias": "pytorch_model-00001-of-00002.bin",
99
+ "transformer.h.15.ln_2.weight": "pytorch_model-00001-of-00002.bin",
100
+ "transformer.h.15.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
101
+ "transformer.h.15.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
102
+ "transformer.h.15.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
103
+ "transformer.h.15.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
104
+ "transformer.h.16.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
105
+ "transformer.h.16.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
106
+ "transformer.h.16.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
107
+ "transformer.h.16.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
108
+ "transformer.h.16.ln_1.bias": "pytorch_model-00001-of-00002.bin",
109
+ "transformer.h.16.ln_1.weight": "pytorch_model-00001-of-00002.bin",
110
+ "transformer.h.16.ln_2.bias": "pytorch_model-00001-of-00002.bin",
111
+ "transformer.h.16.ln_2.weight": "pytorch_model-00001-of-00002.bin",
112
+ "transformer.h.16.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
113
+ "transformer.h.16.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
114
+ "transformer.h.16.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
115
+ "transformer.h.16.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
116
+ "transformer.h.17.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
117
+ "transformer.h.17.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
118
+ "transformer.h.17.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
119
+ "transformer.h.17.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
120
+ "transformer.h.17.ln_1.bias": "pytorch_model-00001-of-00002.bin",
121
+ "transformer.h.17.ln_1.weight": "pytorch_model-00001-of-00002.bin",
122
+ "transformer.h.17.ln_2.bias": "pytorch_model-00001-of-00002.bin",
123
+ "transformer.h.17.ln_2.weight": "pytorch_model-00001-of-00002.bin",
124
+ "transformer.h.17.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
125
+ "transformer.h.17.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
126
+ "transformer.h.17.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
127
+ "transformer.h.17.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
128
+ "transformer.h.18.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
129
+ "transformer.h.18.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
130
+ "transformer.h.18.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
131
+ "transformer.h.18.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
132
+ "transformer.h.18.ln_1.bias": "pytorch_model-00001-of-00002.bin",
133
+ "transformer.h.18.ln_1.weight": "pytorch_model-00001-of-00002.bin",
134
+ "transformer.h.18.ln_2.bias": "pytorch_model-00001-of-00002.bin",
135
+ "transformer.h.18.ln_2.weight": "pytorch_model-00001-of-00002.bin",
136
+ "transformer.h.18.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
137
+ "transformer.h.18.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
138
+ "transformer.h.18.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
139
+ "transformer.h.18.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
140
+ "transformer.h.19.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
141
+ "transformer.h.19.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
142
+ "transformer.h.19.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
143
+ "transformer.h.19.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
144
+ "transformer.h.19.ln_1.bias": "pytorch_model-00001-of-00002.bin",
145
+ "transformer.h.19.ln_1.weight": "pytorch_model-00001-of-00002.bin",
146
+ "transformer.h.19.ln_2.bias": "pytorch_model-00001-of-00002.bin",
147
+ "transformer.h.19.ln_2.weight": "pytorch_model-00001-of-00002.bin",
148
+ "transformer.h.19.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
149
+ "transformer.h.19.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
150
+ "transformer.h.19.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
151
+ "transformer.h.19.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
152
+ "transformer.h.2.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
153
+ "transformer.h.2.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
154
+ "transformer.h.2.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
155
+ "transformer.h.2.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
156
+ "transformer.h.2.ln_1.bias": "pytorch_model-00001-of-00002.bin",
157
+ "transformer.h.2.ln_1.weight": "pytorch_model-00001-of-00002.bin",
158
+ "transformer.h.2.ln_2.bias": "pytorch_model-00001-of-00002.bin",
159
+ "transformer.h.2.ln_2.weight": "pytorch_model-00001-of-00002.bin",
160
+ "transformer.h.2.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
161
+ "transformer.h.2.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
162
+ "transformer.h.2.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
163
+ "transformer.h.2.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
164
+ "transformer.h.20.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
165
+ "transformer.h.20.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
166
+ "transformer.h.20.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
167
+ "transformer.h.20.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
168
+ "transformer.h.20.ln_1.bias": "pytorch_model-00001-of-00002.bin",
169
+ "transformer.h.20.ln_1.weight": "pytorch_model-00001-of-00002.bin",
170
+ "transformer.h.20.ln_2.bias": "pytorch_model-00001-of-00002.bin",
171
+ "transformer.h.20.ln_2.weight": "pytorch_model-00001-of-00002.bin",
172
+ "transformer.h.20.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
173
+ "transformer.h.20.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
174
+ "transformer.h.20.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
175
+ "transformer.h.20.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
176
+ "transformer.h.21.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
177
+ "transformer.h.21.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
178
+ "transformer.h.21.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
179
+ "transformer.h.21.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
180
+ "transformer.h.21.ln_1.bias": "pytorch_model-00001-of-00002.bin",
181
+ "transformer.h.21.ln_1.weight": "pytorch_model-00001-of-00002.bin",
182
+ "transformer.h.21.ln_2.bias": "pytorch_model-00001-of-00002.bin",
183
+ "transformer.h.21.ln_2.weight": "pytorch_model-00001-of-00002.bin",
184
+ "transformer.h.21.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
185
+ "transformer.h.21.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
186
+ "transformer.h.21.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
187
+ "transformer.h.21.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
188
+ "transformer.h.22.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
189
+ "transformer.h.22.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
190
+ "transformer.h.22.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
191
+ "transformer.h.22.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
192
+ "transformer.h.22.ln_1.bias": "pytorch_model-00001-of-00002.bin",
193
+ "transformer.h.22.ln_1.weight": "pytorch_model-00001-of-00002.bin",
194
+ "transformer.h.22.ln_2.bias": "pytorch_model-00001-of-00002.bin",
195
+ "transformer.h.22.ln_2.weight": "pytorch_model-00001-of-00002.bin",
196
+ "transformer.h.22.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
197
+ "transformer.h.22.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
198
+ "transformer.h.22.mlp.c_proj.bias": "pytorch_model-00002-of-00002.bin",
199
+ "transformer.h.22.mlp.c_proj.weight": "pytorch_model-00002-of-00002.bin",
200
+ "transformer.h.23.attn.c_attn.bias": "pytorch_model-00002-of-00002.bin",
201
+ "transformer.h.23.attn.c_attn.weight": "pytorch_model-00002-of-00002.bin",
202
+ "transformer.h.23.attn.c_proj.bias": "pytorch_model-00002-of-00002.bin",
203
+ "transformer.h.23.attn.c_proj.weight": "pytorch_model-00002-of-00002.bin",
204
+ "transformer.h.23.ln_1.bias": "pytorch_model-00002-of-00002.bin",
205
+ "transformer.h.23.ln_1.weight": "pytorch_model-00002-of-00002.bin",
206
+ "transformer.h.23.ln_2.bias": "pytorch_model-00002-of-00002.bin",
207
+ "transformer.h.23.ln_2.weight": "pytorch_model-00002-of-00002.bin",
208
+ "transformer.h.23.mlp.c_fc.bias": "pytorch_model-00002-of-00002.bin",
209
+ "transformer.h.23.mlp.c_fc.weight": "pytorch_model-00002-of-00002.bin",
210
+ "transformer.h.23.mlp.c_proj.bias": "pytorch_model-00002-of-00002.bin",
211
+ "transformer.h.23.mlp.c_proj.weight": "pytorch_model-00002-of-00002.bin",
212
+ "transformer.h.3.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
213
+ "transformer.h.3.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
214
+ "transformer.h.3.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
215
+ "transformer.h.3.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
216
+ "transformer.h.3.ln_1.bias": "pytorch_model-00001-of-00002.bin",
217
+ "transformer.h.3.ln_1.weight": "pytorch_model-00001-of-00002.bin",
218
+ "transformer.h.3.ln_2.bias": "pytorch_model-00001-of-00002.bin",
219
+ "transformer.h.3.ln_2.weight": "pytorch_model-00001-of-00002.bin",
220
+ "transformer.h.3.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
221
+ "transformer.h.3.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
222
+ "transformer.h.3.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
223
+ "transformer.h.3.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
224
+ "transformer.h.4.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
225
+ "transformer.h.4.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
226
+ "transformer.h.4.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
227
+ "transformer.h.4.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
228
+ "transformer.h.4.ln_1.bias": "pytorch_model-00001-of-00002.bin",
229
+ "transformer.h.4.ln_1.weight": "pytorch_model-00001-of-00002.bin",
230
+ "transformer.h.4.ln_2.bias": "pytorch_model-00001-of-00002.bin",
231
+ "transformer.h.4.ln_2.weight": "pytorch_model-00001-of-00002.bin",
232
+ "transformer.h.4.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
233
+ "transformer.h.4.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
234
+ "transformer.h.4.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
235
+ "transformer.h.4.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
236
+ "transformer.h.5.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
237
+ "transformer.h.5.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
238
+ "transformer.h.5.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
239
+ "transformer.h.5.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
240
+ "transformer.h.5.ln_1.bias": "pytorch_model-00001-of-00002.bin",
241
+ "transformer.h.5.ln_1.weight": "pytorch_model-00001-of-00002.bin",
242
+ "transformer.h.5.ln_2.bias": "pytorch_model-00001-of-00002.bin",
243
+ "transformer.h.5.ln_2.weight": "pytorch_model-00001-of-00002.bin",
244
+ "transformer.h.5.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
245
+ "transformer.h.5.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
246
+ "transformer.h.5.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
247
+ "transformer.h.5.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
248
+ "transformer.h.6.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
249
+ "transformer.h.6.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
250
+ "transformer.h.6.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
251
+ "transformer.h.6.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
252
+ "transformer.h.6.ln_1.bias": "pytorch_model-00001-of-00002.bin",
253
+ "transformer.h.6.ln_1.weight": "pytorch_model-00001-of-00002.bin",
254
+ "transformer.h.6.ln_2.bias": "pytorch_model-00001-of-00002.bin",
255
+ "transformer.h.6.ln_2.weight": "pytorch_model-00001-of-00002.bin",
256
+ "transformer.h.6.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
257
+ "transformer.h.6.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
258
+ "transformer.h.6.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
259
+ "transformer.h.6.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
260
+ "transformer.h.7.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
261
+ "transformer.h.7.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
262
+ "transformer.h.7.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
263
+ "transformer.h.7.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
264
+ "transformer.h.7.ln_1.bias": "pytorch_model-00001-of-00002.bin",
265
+ "transformer.h.7.ln_1.weight": "pytorch_model-00001-of-00002.bin",
266
+ "transformer.h.7.ln_2.bias": "pytorch_model-00001-of-00002.bin",
267
+ "transformer.h.7.ln_2.weight": "pytorch_model-00001-of-00002.bin",
268
+ "transformer.h.7.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
269
+ "transformer.h.7.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
270
+ "transformer.h.7.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
271
+ "transformer.h.7.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
272
+ "transformer.h.8.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
273
+ "transformer.h.8.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
274
+ "transformer.h.8.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
275
+ "transformer.h.8.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
276
+ "transformer.h.8.ln_1.bias": "pytorch_model-00001-of-00002.bin",
277
+ "transformer.h.8.ln_1.weight": "pytorch_model-00001-of-00002.bin",
278
+ "transformer.h.8.ln_2.bias": "pytorch_model-00001-of-00002.bin",
279
+ "transformer.h.8.ln_2.weight": "pytorch_model-00001-of-00002.bin",
280
+ "transformer.h.8.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
281
+ "transformer.h.8.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
282
+ "transformer.h.8.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
283
+ "transformer.h.8.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
284
+ "transformer.h.9.attn.c_attn.bias": "pytorch_model-00001-of-00002.bin",
285
+ "transformer.h.9.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
286
+ "transformer.h.9.attn.c_proj.bias": "pytorch_model-00001-of-00002.bin",
287
+ "transformer.h.9.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
288
+ "transformer.h.9.ln_1.bias": "pytorch_model-00001-of-00002.bin",
289
+ "transformer.h.9.ln_1.weight": "pytorch_model-00001-of-00002.bin",
290
+ "transformer.h.9.ln_2.bias": "pytorch_model-00001-of-00002.bin",
291
+ "transformer.h.9.ln_2.weight": "pytorch_model-00001-of-00002.bin",
292
+ "transformer.h.9.mlp.c_fc.bias": "pytorch_model-00001-of-00002.bin",
293
+ "transformer.h.9.mlp.c_fc.weight": "pytorch_model-00001-of-00002.bin",
294
+ "transformer.h.9.mlp.c_proj.bias": "pytorch_model-00001-of-00002.bin",
295
+ "transformer.h.9.mlp.c_proj.weight": "pytorch_model-00001-of-00002.bin",
296
+ "transformer.ln_f.bias": "pytorch_model-00002-of-00002.bin",
297
+ "transformer.ln_f.weight": "pytorch_model-00002-of-00002.bin",
298
+ "transformer.wpe.weight": "pytorch_model-00001-of-00002.bin",
299
+ "transformer.wte.weight": "pytorch_model-00001-of-00002.bin"
300
+ }
301
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
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": "</s>",
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 ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "[CLS]",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "2": {
13
+ "content": "<s>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "3": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "4": {
29
+ "content": "[PAD]",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "5": {
37
+ "content": "[SEP]",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "6": {
45
+ "content": "[MASK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "44876": {
53
+ "content": "<unk>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ }
60
+ },
61
+ "additional_special_tokens": [],
62
+ "bos_token": "<s>",
63
+ "clean_up_tokenization_spaces": true,
64
+ "cls_token": "[CLS]",
65
+ "do_lower_case": false,
66
+ "eos_token": "</s>",
67
+ "extra_ids": 0,
68
+ "legacy": false,
69
+ "mask_token": "[MASK]",
70
+ "model_max_length": 2048,
71
+ "pad_token": "[PAD]",
72
+ "sep_token": "[SEP]",
73
+ "sp_model_kwargs": {},
74
+ "tokenizer_class": "PreTrainedTokenizerFast",
75
+ "unk_token": "<unk>"
76
+ }
ud.py ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy
2
+ from transformers import TokenClassificationPipeline
3
+
4
+ class BellmanFordTokenClassificationPipeline(TokenClassificationPipeline):
5
+ def __init__(self,**kwargs):
6
+ super().__init__(**kwargs)
7
+ x=self.model.config.label2id
8
+ y=[k for k in x if k.startswith("B-") or not (k.startswith("I-") or k.endswith("|root") or k.find("|l-")>0 or k.find("|r-")>0)]
9
+ self.transition=numpy.full((len(x),len(x)),numpy.nan)
10
+ for k,v in x.items():
11
+ for j in ["I-"+k[2:]] if k.startswith("B-") else [k]+y if k.startswith("I-") else y:
12
+ self.transition[v,x[j]]=0
13
+ def check_model_type(self,supported_models):
14
+ pass
15
+ def postprocess(self,model_outputs,**kwargs):
16
+ if "logits" not in model_outputs:
17
+ return self.postprocess(model_outputs[0],**kwargs)
18
+ m=model_outputs["logits"][0].numpy()
19
+ e=numpy.exp(m-numpy.max(m,axis=-1,keepdims=True))
20
+ z=e/e.sum(axis=-1,keepdims=True)
21
+ for i in range(m.shape[0]-1,0,-1):
22
+ m[i-1]+=numpy.nanmax(m[i]+self.transition,axis=1)
23
+ k=[numpy.nanargmax(m[0]+self.transition[0])]
24
+ for i in range(1,m.shape[0]):
25
+ k.append(numpy.nanargmax(m[i]+self.transition[k[-1]]))
26
+ w=[{"entity":self.model.config.id2label[j],"start":s,"end":e,"score":z[i,j]} for i,((s,e),j) in enumerate(zip(model_outputs["offset_mapping"][0].tolist(),k)) if s<e]
27
+ if "aggregation_strategy" in kwargs and kwargs["aggregation_strategy"]!="none":
28
+ for i,t in reversed(list(enumerate(w))):
29
+ p=t.pop("entity")
30
+ if p.startswith("I-"):
31
+ w[i-1]["score"]=min(w[i-1]["score"],t["score"])
32
+ w[i-1]["end"]=w.pop(i)["end"]
33
+ elif p.startswith("B-"):
34
+ t["entity_group"]=p[2:]
35
+ else:
36
+ t["entity_group"]=p
37
+ for t in w:
38
+ t["text"]=model_outputs["sentence"][t["start"]:t["end"]]
39
+ return w
40
+
41
+ class UniversalDependenciesCausalPipeline(BellmanFordTokenClassificationPipeline):
42
+ def __init__(self,**kwargs):
43
+ kwargs["aggregation_strategy"]="simple"
44
+ super().__init__(**kwargs)
45
+ x=self.model.config.label2id
46
+ self.root=numpy.full((len(x)),numpy.nan)
47
+ self.left_arc=numpy.full((len(x)),numpy.nan)
48
+ self.right_arc=numpy.full((len(x)),numpy.nan)
49
+ for k,v in x.items():
50
+ if k.endswith("|root"):
51
+ self.root[v]=0
52
+ elif k.find("|l-")>0:
53
+ self.left_arc[v]=0
54
+ elif k.find("|r-")>0:
55
+ self.right_arc[v]=0
56
+ def postprocess(self,model_outputs,**kwargs):
57
+ import torch
58
+ if "logits" not in model_outputs:
59
+ return self.postprocess(model_outputs[0],**kwargs)
60
+ m=model_outputs["logits"][0].numpy()
61
+ for i in range(m.shape[0]-1,0,-1):
62
+ m[i-1]+=numpy.nanmax(m[i]+self.transition,axis=1)
63
+ k=[numpy.nanargmax(m[0]+self.transition[0])]
64
+ for i in range(1,m.shape[0]):
65
+ k.append(numpy.nanargmax(m[i]+self.transition[k[-1]]))
66
+ w=[{"entity":self.model.config.id2label[j],"start":s,"end":e} for i,((s,e),j) in enumerate(zip(model_outputs["offset_mapping"][0].tolist(),k)) if s<e]
67
+ for i,t in reversed(list(enumerate(w))):
68
+ p=t.pop("entity")
69
+ if p.startswith("I-"):
70
+ w[i-1]["end"]=max(w.pop(i)["end"],w[i-1]["end"])
71
+ elif i>0 and w[i-1]["end"]>w[i]["start"]:
72
+ w[i-1]["end"]=max(w.pop(i)["end"],w[i-1]["end"])
73
+ elif p.startswith("B-"):
74
+ t["entity_group"]=p[2:]
75
+ else:
76
+ t["entity_group"]=p
77
+ d=[model_outputs["sentence"][t["start"]:t["end"]] for t in w]
78
+ for i in range(len(d)-1,-1,-1):
79
+ if d[i].startswith(" "):
80
+ j=len(d[i])-len(d[i].lstrip())
81
+ d[i]=d[i].lstrip()
82
+ w[i]["start"]+=j
83
+ if d[i].endswith(" "):
84
+ j=len(d[i])-len(d[i].rstrip())
85
+ d[i]=d[i].rstrip()
86
+ w[i]["end"]-=j
87
+ if d[i].strip()=="":
88
+ d.pop(i)
89
+ w.pop(i)
90
+ v=self.tokenizer(d,add_special_tokens=False)
91
+ e=self.model.get_input_embeddings().weight
92
+ m=[]
93
+ for x in v["input_ids"]:
94
+ if x==[]:
95
+ x=[self.tokenizer.unk_token_id]
96
+ m.append(e[x,:].sum(axis=0))
97
+ m.append(e[self.tokenizer.sep_token_id,:])
98
+ m.append(e[self.tokenizer.pad_token_id,:])
99
+ m=torch.stack(m).to(self.device)
100
+ k=list(range(len(d)+1))
101
+ e=[]
102
+ with torch.no_grad():
103
+ for i in range(len(d)):
104
+ e.append(self.model(inputs_embeds=torch.unsqueeze(m[k+list(range(i,len(d)))+[-1]*i,:],0)).logits[0,-len(d):,:])
105
+ e=torch.stack(e).cpu().numpy()
106
+ for i in range(len(d)):
107
+ for j in range(i):
108
+ e[-j-1,-i-1],e[-i-1,-j-1]=e[-i-1,i-j]+self.left_arc,e[-i-1,i-j]+self.right_arc
109
+ e[-i-1,-i-1]=e[-i-1,0]+self.root
110
+ m,p=numpy.nanmax(e,axis=2),numpy.nanargmax(e,axis=2)
111
+ h=self.chu_liu_edmonds(m)
112
+ z=[i for i,j in enumerate(h) if i==j]
113
+ if len(z)>1:
114
+ k,h=z[numpy.nanargmax(m[z,z])],numpy.nanmin(m)-numpy.nanmax(m)
115
+ m[:,z]+=[[0 if j in z and (i!=j or i==k) else h for i in z] for j in range(m.shape[0])]
116
+ h=self.chu_liu_edmonds(m)
117
+ q=[self.model.config.id2label[p[j,i]].split("|") for i,j in enumerate(h)]
118
+ t=model_outputs["sentence"].replace("\n"," ")
119
+ u="# text = "+t+"\n"
120
+ for i,j in enumerate(d):
121
+ u+="\t".join([str(i+1),j,"_",q[i][0],"_","_" if len(q[i])<3 else "|".join(q[i][1:-1]),str(0 if h[i]==i else h[i]+1),"root" if q[i][-1]=="root" else q[i][-1][2:],"_","_" if i+1<len(d) and w[i]["end"]<w[i+1]["start"] else "SpaceAfter=No"])+"\n"
122
+ return u+"\n"
123
+ def chu_liu_edmonds(self,matrix):
124
+ h=numpy.nanargmax(matrix,axis=0)
125
+ x=[-1 if i==j else j for i,j in enumerate(h)]
126
+ for b in [lambda x,i,j:-1 if i not in x else x[i],lambda x,i,j:-1 if j<0 else x[j]]:
127
+ y=[]
128
+ while x!=y:
129
+ y=list(x)
130
+ for i,j in enumerate(x):
131
+ x[i]=b(x,i,j)
132
+ if max(x)<0:
133
+ return h
134
+ y,x=[i for i,j in enumerate(x) if j==max(x)],[i for i,j in enumerate(x) if j<max(x)]
135
+ z=matrix-numpy.nanmax(matrix,axis=0)
136
+ m=numpy.block([[z[x,:][:,x],numpy.nanmax(z[x,:][:,y],axis=1).reshape(len(x),1)],[numpy.nanmax(z[y,:][:,x],axis=0),numpy.nanmax(z[y,y])]])
137
+ k=[j if i==len(x) else x[j] if j<len(x) else y[numpy.nanargmax(z[y,x[i]])] for i,j in enumerate(self.chu_liu_edmonds(m))]
138
+ h=[j if i in y else k[x.index(i)] for i,j in enumerate(h)]
139
+ i=y[numpy.nanargmax(z[x[k[-1]],y] if k[-1]<len(x) else z[y,y])]
140
+ h[i]=x[k[-1]] if k[-1]<len(x) else i
141
+ return h