Token Classification
GLiNER
PyTorch
multilingual
NER
GLiNER
information extraction
encoder
entity recognition
Ihor commited on
Commit
cb91124
1 Parent(s): e72b633

Upload folder using huggingface_hub

Browse files
added_tokens.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<<ENT>>": 151646,
3
+ "<<SEP>>": 151647,
4
+ "<|endoftext|>": 151643,
5
+ "<|im_end|>": 151645,
6
+ "<|im_start|>": 151644,
7
+ "[UNK]": 151648
8
+ }
gliner_config.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "class_token_index": 151646,
3
+ "dropout": 0.4,
4
+ "embed_ent_token": false,
5
+ "encoder_config": {
6
+ "_name_or_path": "knowledgator/Qwen2-1.5B-Instruct-checkpint30000",
7
+ "add_cross_attention": false,
8
+ "architectures": [
9
+ "Qwen2ForCausalLM"
10
+ ],
11
+ "attention_dropout": 0.0,
12
+ "bad_words_ids": null,
13
+ "begin_suppress_tokens": null,
14
+ "bos_token_id": 151643,
15
+ "chunk_size_feed_forward": 0,
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": 151645,
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": "silu",
28
+ "hidden_size": 1536,
29
+ "id2label": {
30
+ "0": "LABEL_0",
31
+ "1": "LABEL_1"
32
+ },
33
+ "initializer_range": 0.02,
34
+ "intermediate_size": 8960,
35
+ "is_decoder": false,
36
+ "is_encoder_decoder": false,
37
+ "label2id": {
38
+ "LABEL_0": 0,
39
+ "LABEL_1": 1
40
+ },
41
+ "length_penalty": 1.0,
42
+ "max_length": 20,
43
+ "max_position_embeddings": 32768,
44
+ "max_window_layers": 28,
45
+ "min_length": 0,
46
+ "model_type": "qwen2",
47
+ "no_repeat_ngram_size": 0,
48
+ "num_attention_heads": 12,
49
+ "num_beam_groups": 1,
50
+ "num_beams": 1,
51
+ "num_hidden_layers": 28,
52
+ "num_key_value_heads": 2,
53
+ "num_return_sequences": 1,
54
+ "output_attentions": false,
55
+ "output_hidden_states": false,
56
+ "output_scores": false,
57
+ "pad_token_id": null,
58
+ "prefix": null,
59
+ "problem_type": null,
60
+ "pruned_heads": {},
61
+ "remove_invalid_values": false,
62
+ "repetition_penalty": 1.0,
63
+ "return_dict": true,
64
+ "return_dict_in_generate": false,
65
+ "rms_norm_eps": 1e-06,
66
+ "rope_theta": 1000000.0,
67
+ "sep_token_id": null,
68
+ "sliding_window": 32768,
69
+ "suppress_tokens": null,
70
+ "task_specific_params": null,
71
+ "temperature": 1.0,
72
+ "tf_legacy_loss": false,
73
+ "tie_encoder_decoder": false,
74
+ "tie_word_embeddings": true,
75
+ "tokenizer_class": null,
76
+ "top_k": 50,
77
+ "top_p": 1.0,
78
+ "torch_dtype": "float32",
79
+ "torchscript": false,
80
+ "typical_p": 1.0,
81
+ "use_bfloat16": false,
82
+ "use_cache": true,
83
+ "use_sliding_window": false,
84
+ "vocab_size": 151648
85
+ },
86
+ "ent_token": "<<ENT>>",
87
+ "eval_every": 3000,
88
+ "fine_tune": true,
89
+ "freeze_token_rep": false,
90
+ "fuse_layers": false,
91
+ "has_rnn": true,
92
+ "hidden_size": 2048,
93
+ "label_smoothing": 0.0,
94
+ "labels_encoder": null,
95
+ "labels_encoder_config": null,
96
+ "log_dir": "models/qwen",
97
+ "loss_alpha": 0.75,
98
+ "loss_gamma": -1,
99
+ "loss_reduction": "sum",
100
+ "lr_encoder": "1e-5",
101
+ "lr_others": "5e-5",
102
+ "max_grad_norm": 10.0,
103
+ "max_len": 512,
104
+ "max_neg_type_ratio": 1,
105
+ "max_types": 30,
106
+ "max_width": 12,
107
+ "model_name": "knowledgator/Qwen2-1.5B-Instruct-checkpint30000",
108
+ "model_type": "gliner",
109
+ "name": "span level gliner",
110
+ "num_post_fusion_layers": 1,
111
+ "num_steps": 9000,
112
+ "post_fusion_schema": "",
113
+ "prev_path": null,
114
+ "random_drop": true,
115
+ "root_dir": "gliner_logs",
116
+ "save_total_limit": 3,
117
+ "scheduler_type": "linear",
118
+ "sep_token": "<<SEP>>",
119
+ "shuffle_types": true,
120
+ "size_sup": -1,
121
+ "span_mode": "markerV0",
122
+ "subtoken_pooling": "first",
123
+ "train_batch_size": 8,
124
+ "train_data": "data.json",
125
+ "transformers_version": "4.40.2",
126
+ "val_data_dir": "none",
127
+ "vocab_size": 151648,
128
+ "warmup_ratio": 0.1,
129
+ "weight_decay_encoder": 0.01,
130
+ "weight_decay_other": 0.01,
131
+ "words_splitter_type": "whitespace"
132
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23fceb25e4d7b2391ad53746befeb67e6fc2e1b76178b208ca070a6ef7a983e1
3
+ size 6890734142
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddd00744ebc35e5532da684a65603111bad31e08a85efc9d4befec6090d572a3
3
+ size 14244
special_tokens_map.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "mask_token": {
14
+ "content": "_",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "pad_token": {
21
+ "content": "<|endoftext|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "unk_token": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }
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
+ "62": {
5
+ "content": "_",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151643": {
13
+ "content": "<|endoftext|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151644": {
21
+ "content": "<|im_start|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "151645": {
29
+ "content": "<|im_end|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151646": {
37
+ "content": "<<ENT>>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151647": {
45
+ "content": "<<SEP>>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "151648": {
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
+ "<|im_start|>",
63
+ "<|im_end|>"
64
+ ],
65
+ "bos_token": null,
66
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
67
+ "clean_up_tokenization_spaces": false,
68
+ "eos_token": "<|im_end|>",
69
+ "errors": "replace",
70
+ "mask_token": "_",
71
+ "model_max_length": 32768,
72
+ "pad_token": "<|endoftext|>",
73
+ "split_special_tokens": false,
74
+ "tokenizer_class": "Qwen2Tokenizer",
75
+ "unk_token": "[UNK]"
76
+ }
trainer_state.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.046207497820401,
5
+ "eval_steps": 500,
6
+ "global_step": 1200,
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.08718395815170009,
13
+ "grad_norm": 1260.8033447265625,
14
+ "learning_rate": 8.333333333333333e-07,
15
+ "loss": 14.8341,
16
+ "step": 100
17
+ },
18
+ {
19
+ "epoch": 0.17436791630340018,
20
+ "grad_norm": 745.888427734375,
21
+ "learning_rate": 9.259259259259259e-07,
22
+ "loss": 15.6171,
23
+ "step": 200
24
+ },
25
+ {
26
+ "epoch": 0.26155187445510025,
27
+ "grad_norm": 840.9533081054688,
28
+ "learning_rate": 8.333333333333333e-07,
29
+ "loss": 15.8498,
30
+ "step": 300
31
+ },
32
+ {
33
+ "epoch": 0.34873583260680036,
34
+ "grad_norm": 373.6918029785156,
35
+ "learning_rate": 7.407407407407406e-07,
36
+ "loss": 16.6859,
37
+ "step": 400
38
+ },
39
+ {
40
+ "epoch": 0.43591979075850046,
41
+ "grad_norm": 580.3277587890625,
42
+ "learning_rate": 6.481481481481481e-07,
43
+ "loss": 14.4898,
44
+ "step": 500
45
+ },
46
+ {
47
+ "epoch": 0.5231037489102005,
48
+ "grad_norm": 77.99569702148438,
49
+ "learning_rate": 5.555555555555555e-07,
50
+ "loss": 15.7702,
51
+ "step": 600
52
+ },
53
+ {
54
+ "epoch": 0.6102877070619006,
55
+ "grad_norm": 147.39584350585938,
56
+ "learning_rate": 4.6296296296296297e-07,
57
+ "loss": 15.0814,
58
+ "step": 700
59
+ },
60
+ {
61
+ "epoch": 0.6974716652136007,
62
+ "grad_norm": 141.38795471191406,
63
+ "learning_rate": 3.703703703703703e-07,
64
+ "loss": 12.6944,
65
+ "step": 800
66
+ },
67
+ {
68
+ "epoch": 0.7846556233653008,
69
+ "grad_norm": 947.9025268554688,
70
+ "learning_rate": 2.7777777777777776e-07,
71
+ "loss": 12.4095,
72
+ "step": 900
73
+ },
74
+ {
75
+ "epoch": 0.8718395815170009,
76
+ "grad_norm": 862.9531860351562,
77
+ "learning_rate": 1.8518518518518516e-07,
78
+ "loss": 12.4597,
79
+ "step": 1000
80
+ },
81
+ {
82
+ "epoch": 0.9590235396687009,
83
+ "grad_norm": 247.12240600585938,
84
+ "learning_rate": 9.259259259259258e-08,
85
+ "loss": 11.3951,
86
+ "step": 1100
87
+ },
88
+ {
89
+ "epoch": 1.0,
90
+ "eval_loss": 476.5635681152344,
91
+ "eval_runtime": 22.3653,
92
+ "eval_samples_per_second": 45.606,
93
+ "eval_steps_per_second": 5.723,
94
+ "step": 1147
95
+ },
96
+ {
97
+ "epoch": 1.046207497820401,
98
+ "grad_norm": 573.4383544921875,
99
+ "learning_rate": 0.0,
100
+ "loss": 12.2434,
101
+ "step": 1200
102
+ }
103
+ ],
104
+ "logging_steps": 100,
105
+ "max_steps": 1200,
106
+ "num_input_tokens_seen": 0,
107
+ "num_train_epochs": 2,
108
+ "save_steps": 600,
109
+ "total_flos": 0.0,
110
+ "train_batch_size": 8,
111
+ "trial_name": null,
112
+ "trial_params": null
113
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff