Token Classification
GLiNER
PyTorch
multilingual
Ihor commited on
Commit
2ca0a51
·
verified ·
1 Parent(s): f64a915

Upload folder using huggingface_hub

Browse files
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<<ENT>>": 128001,
3
+ "<<SEP>>": 128002,
4
+ "[MASK]": 128000
5
+ }
gliner_config.json ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "class_token_index": 128001,
3
+ "dropout": 0.4,
4
+ "encoder_config": {
5
+ "_name_or_path": "microsoft/deberta-v2-xxlarge",
6
+ "add_cross_attention": false,
7
+ "architectures": null,
8
+ "attention_head_size": 64,
9
+ "attention_probs_dropout_prob": 0.1,
10
+ "bad_words_ids": null,
11
+ "begin_suppress_tokens": null,
12
+ "bos_token_id": null,
13
+ "chunk_size_feed_forward": 0,
14
+ "conv_act": "gelu",
15
+ "conv_kernel_size": 3,
16
+ "cross_attention_hidden_size": null,
17
+ "decoder_start_token_id": null,
18
+ "diversity_penalty": 0.0,
19
+ "do_sample": false,
20
+ "early_stopping": false,
21
+ "encoder_no_repeat_ngram_size": 0,
22
+ "eos_token_id": null,
23
+ "exponential_decay_length_penalty": null,
24
+ "finetuning_task": null,
25
+ "forced_bos_token_id": null,
26
+ "forced_eos_token_id": null,
27
+ "hidden_act": "gelu",
28
+ "hidden_dropout_prob": 0.1,
29
+ "hidden_size": 1536,
30
+ "id2label": {
31
+ "0": "LABEL_0",
32
+ "1": "LABEL_1"
33
+ },
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 6144,
36
+ "is_decoder": false,
37
+ "is_encoder_decoder": false,
38
+ "label2id": {
39
+ "LABEL_0": 0,
40
+ "LABEL_1": 1
41
+ },
42
+ "layer_norm_eps": 1e-07,
43
+ "length_penalty": 1.0,
44
+ "max_length": 20,
45
+ "max_position_embeddings": 512,
46
+ "max_relative_positions": -1,
47
+ "min_length": 0,
48
+ "model_type": "deberta-v2",
49
+ "no_repeat_ngram_size": 0,
50
+ "norm_rel_ebd": "layer_norm",
51
+ "num_attention_heads": 24,
52
+ "num_beam_groups": 1,
53
+ "num_beams": 1,
54
+ "num_hidden_layers": 48,
55
+ "num_return_sequences": 1,
56
+ "output_attentions": false,
57
+ "output_hidden_states": false,
58
+ "output_scores": false,
59
+ "pad_token_id": 0,
60
+ "pooler_dropout": 0,
61
+ "pooler_hidden_act": "gelu",
62
+ "pooler_hidden_size": 1536,
63
+ "pos_att_type": [
64
+ "p2c",
65
+ "c2p"
66
+ ],
67
+ "position_biased_input": false,
68
+ "position_buckets": 256,
69
+ "prefix": null,
70
+ "problem_type": null,
71
+ "pruned_heads": {},
72
+ "relative_attention": true,
73
+ "remove_invalid_values": false,
74
+ "repetition_penalty": 1.0,
75
+ "return_dict": true,
76
+ "return_dict_in_generate": false,
77
+ "sep_token_id": null,
78
+ "share_att_key": true,
79
+ "suppress_tokens": null,
80
+ "task_specific_params": null,
81
+ "temperature": 1.0,
82
+ "tf_legacy_loss": false,
83
+ "tie_encoder_decoder": false,
84
+ "tie_word_embeddings": true,
85
+ "tokenizer_class": null,
86
+ "top_k": 50,
87
+ "top_p": 1.0,
88
+ "torch_dtype": null,
89
+ "torchscript": false,
90
+ "type_vocab_size": 0,
91
+ "typical_p": 1.0,
92
+ "use_bfloat16": false,
93
+ "vocab_size": 128003
94
+ },
95
+ "ent_token": "<<ENT>>",
96
+ "eval_every": 3000,
97
+ "fine_tune": true,
98
+ "freeze_token_rep": false,
99
+ "fuse_layers": false,
100
+ "has_rnn": true,
101
+ "hidden_size": 1024,
102
+ "label_smoothing": 0.0,
103
+ "labels_encoder": null,
104
+ "labels_encoder_config": null,
105
+ "log_dir": "models/deberta",
106
+ "loss_alpha": 0.8,
107
+ "loss_gamma": -1,
108
+ "loss_reduction": "sum",
109
+ "lr_encoder": "1e-5",
110
+ "lr_others": "5e-5",
111
+ "max_grad_norm": 10.0,
112
+ "max_len": 512,
113
+ "max_neg_type_ratio": 1,
114
+ "max_types": 30,
115
+ "max_width": 12,
116
+ "model_name": "microsoft/deberta-v2-xxlarge",
117
+ "model_type": "gliner",
118
+ "name": "span level gliner",
119
+ "num_steps": 15000,
120
+ "post_fusion_schema": "",
121
+ "prev_path": null,
122
+ "random_drop": true,
123
+ "root_dir": "gliner_logs",
124
+ "save_total_limit": 3,
125
+ "scheduler_type": "cosine",
126
+ "sep_token": "<<SEP>>",
127
+ "shuffle_types": true,
128
+ "size_sup": -1,
129
+ "span_mode": "markerV0",
130
+ "subtoken_pooling": "first",
131
+ "train_batch_size": 8,
132
+ "train_data": "data.json",
133
+ "transformers_version": "4.40.2",
134
+ "val_data_dir": "none",
135
+ "vocab_size": 128003,
136
+ "warmup_ratio": 0.1,
137
+ "weight_decay_encoder": 0.01,
138
+ "weight_decay_other": 0.01,
139
+ "words_splitter_type": "whitespace"
140
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48d12dea6a1c4645701f9d2fee86af064a6a696f4eaf2ec1b8ed63f4a5fe9c76
3
+ size 6440501494
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
spm.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5598d5e96f339a8d980c15f9afd405a2e5e1be7db41de3ed13b0f03fac1e8c17
3
+ size 2447305
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[CLS]",
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": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "128000": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "128001": {
44
+ "content": "<<ENT>>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "128002": {
52
+ "content": "<<SEP>>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ }
59
+ },
60
+ "bos_token": "[CLS]",
61
+ "clean_up_tokenization_spaces": true,
62
+ "cls_token": "[CLS]",
63
+ "do_lower_case": false,
64
+ "eos_token": "[SEP]",
65
+ "mask_token": "[MASK]",
66
+ "model_max_length": 1000000000000000019884624838656,
67
+ "pad_token": "[PAD]",
68
+ "sep_token": "[SEP]",
69
+ "sp_model_kwargs": {},
70
+ "split_by_punct": false,
71
+ "tokenizer_class": "DebertaV2Tokenizer",
72
+ "unk_token": "[UNK]",
73
+ "vocab_type": "spm"
74
+ }
trainer_state.json ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.112676056338028,
5
+ "eval_steps": 500,
6
+ "global_step": 2400,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.0880281690140845,
13
+ "grad_norm": 1643.14404296875,
14
+ "learning_rate": 4.166666666666667e-06,
15
+ "loss": 136.5152,
16
+ "step": 100
17
+ },
18
+ {
19
+ "epoch": 0.176056338028169,
20
+ "grad_norm": 1259.6392822265625,
21
+ "learning_rate": 8.333333333333334e-06,
22
+ "loss": 127.3215,
23
+ "step": 200
24
+ },
25
+ {
26
+ "epoch": 0.2640845070422535,
27
+ "grad_norm": 1478.6107177734375,
28
+ "learning_rate": 9.980973490458728e-06,
29
+ "loss": 137.0093,
30
+ "step": 300
31
+ },
32
+ {
33
+ "epoch": 0.352112676056338,
34
+ "grad_norm": 586.53076171875,
35
+ "learning_rate": 9.86522435289912e-06,
36
+ "loss": 136.2538,
37
+ "step": 400
38
+ },
39
+ {
40
+ "epoch": 0.44014084507042256,
41
+ "grad_norm": 748.0945434570312,
42
+ "learning_rate": 9.646737621134112e-06,
43
+ "loss": 110.4259,
44
+ "step": 500
45
+ },
46
+ {
47
+ "epoch": 0.528169014084507,
48
+ "grad_norm": 1178.682373046875,
49
+ "learning_rate": 9.330127018922195e-06,
50
+ "loss": 99.7847,
51
+ "step": 600
52
+ },
53
+ {
54
+ "epoch": 0.6161971830985915,
55
+ "grad_norm": 890.4047241210938,
56
+ "learning_rate": 8.92207832459788e-06,
57
+ "loss": 111.7352,
58
+ "step": 700
59
+ },
60
+ {
61
+ "epoch": 0.704225352112676,
62
+ "grad_norm": 333.7227783203125,
63
+ "learning_rate": 8.43120818934367e-06,
64
+ "loss": 104.0762,
65
+ "step": 800
66
+ },
67
+ {
68
+ "epoch": 0.7922535211267606,
69
+ "grad_norm": 1009.5026245117188,
70
+ "learning_rate": 7.86788218175523e-06,
71
+ "loss": 103.2902,
72
+ "step": 900
73
+ },
74
+ {
75
+ "epoch": 0.8802816901408451,
76
+ "grad_norm": 542.9478759765625,
77
+ "learning_rate": 7.243995901002312e-06,
78
+ "loss": 107.7297,
79
+ "step": 1000
80
+ },
81
+ {
82
+ "epoch": 0.9683098591549296,
83
+ "grad_norm": 864.6980590820312,
84
+ "learning_rate": 6.572723780758069e-06,
85
+ "loss": 88.3369,
86
+ "step": 1100
87
+ },
88
+ {
89
+ "epoch": 1.0,
90
+ "eval_loss": 200.542236328125,
91
+ "eval_runtime": 31.8227,
92
+ "eval_samples_per_second": 31.738,
93
+ "eval_steps_per_second": 3.991,
94
+ "step": 1136
95
+ },
96
+ {
97
+ "epoch": 1.056338028169014,
98
+ "grad_norm": 1790.6683349609375,
99
+ "learning_rate": 5.8682408883346535e-06,
100
+ "loss": 91.1943,
101
+ "step": 1200
102
+ },
103
+ {
104
+ "epoch": 1.1443661971830985,
105
+ "grad_norm": 1222.1258544921875,
106
+ "learning_rate": 5.145423593715558e-06,
107
+ "loss": 101.148,
108
+ "step": 1300
109
+ },
110
+ {
111
+ "epoch": 1.232394366197183,
112
+ "grad_norm": 352.8750915527344,
113
+ "learning_rate": 4.4195354293738484e-06,
114
+ "loss": 74.3622,
115
+ "step": 1400
116
+ },
117
+ {
118
+ "epoch": 1.3204225352112675,
119
+ "grad_norm": 2005.60986328125,
120
+ "learning_rate": 3.705904774487396e-06,
121
+ "loss": 85.063,
122
+ "step": 1500
123
+ },
124
+ {
125
+ "epoch": 1.408450704225352,
126
+ "grad_norm": 680.5648193359375,
127
+ "learning_rate": 3.019601169804216e-06,
128
+ "loss": 81.2217,
129
+ "step": 1600
130
+ },
131
+ {
132
+ "epoch": 1.4964788732394365,
133
+ "grad_norm": 394.0007629394531,
134
+ "learning_rate": 2.3751170983272e-06,
135
+ "loss": 83.0847,
136
+ "step": 1700
137
+ },
138
+ {
139
+ "epoch": 1.584507042253521,
140
+ "grad_norm": 868.7428588867188,
141
+ "learning_rate": 1.7860619515673034e-06,
142
+ "loss": 68.1166,
143
+ "step": 1800
144
+ },
145
+ {
146
+ "epoch": 1.6725352112676055,
147
+ "grad_norm": 275.2021179199219,
148
+ "learning_rate": 1.264874643795021e-06,
149
+ "loss": 88.6323,
150
+ "step": 1900
151
+ },
152
+ {
153
+ "epoch": 1.76056338028169,
154
+ "grad_norm": 370.32763671875,
155
+ "learning_rate": 8.225609429353187e-07,
156
+ "loss": 75.0886,
157
+ "step": 2000
158
+ },
159
+ {
160
+ "epoch": 1.8485915492957745,
161
+ "grad_norm": 514.0765380859375,
162
+ "learning_rate": 4.6846106481675035e-07,
163
+ "loss": 70.9229,
164
+ "step": 2100
165
+ },
166
+ {
167
+ "epoch": 1.936619718309859,
168
+ "grad_norm": 687.5501708984375,
169
+ "learning_rate": 2.1005243842255552e-07,
170
+ "loss": 77.3133,
171
+ "step": 2200
172
+ },
173
+ {
174
+ "epoch": 2.0,
175
+ "eval_loss": 195.50889587402344,
176
+ "eval_runtime": 32.1653,
177
+ "eval_samples_per_second": 31.4,
178
+ "eval_steps_per_second": 3.948,
179
+ "step": 2272
180
+ },
181
+ {
182
+ "epoch": 2.0246478873239435,
183
+ "grad_norm": 885.4177856445312,
184
+ "learning_rate": 5.279180709527765e-08,
185
+ "loss": 76.5441,
186
+ "step": 2300
187
+ },
188
+ {
189
+ "epoch": 2.112676056338028,
190
+ "grad_norm": 815.9951782226562,
191
+ "learning_rate": 0.0,
192
+ "loss": 72.9512,
193
+ "step": 2400
194
+ }
195
+ ],
196
+ "logging_steps": 100,
197
+ "max_steps": 2400,
198
+ "num_input_tokens_seen": 0,
199
+ "num_train_epochs": 3,
200
+ "save_steps": 600,
201
+ "total_flos": 0.0,
202
+ "train_batch_size": 8,
203
+ "trial_name": null,
204
+ "trial_params": null
205
+ }