masterkristall commited on
Commit
df8e678
·
verified ·
1 Parent(s): b67fedf

RuModernBERT-base ner finetuned

Browse files
Files changed (6) hide show
  1. README.md +80 -0
  2. config.json +132 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +16 -0
  6. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: deepvk/RuModernBERT-base
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - f1
9
+ - precision
10
+ - recall
11
+ model-index:
12
+ - name: rumodernbert_ner_ft
13
+ results: []
14
+ ---
15
+
16
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
17
+ should probably proofread and complete it, then remove this comment. -->
18
+
19
+ # rumodernbert_ner_ft
20
+
21
+ This model is a fine-tuned version of [deepvk/RuModernBERT-base](https://huggingface.co/deepvk/RuModernBERT-base) on an unknown dataset.
22
+ It achieves the following results on the evaluation set:
23
+ - Loss: 0.2121
24
+ - F1: 0.8730
25
+ - Precision: 0.8596
26
+ - Recall: 0.8868
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 2e-05
46
+ - train_batch_size: 16
47
+ - eval_batch_size: 32
48
+ - seed: 42
49
+ - gradient_accumulation_steps: 2
50
+ - total_train_batch_size: 32
51
+ - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
52
+ - lr_scheduler_type: linear
53
+ - lr_scheduler_warmup_steps: 0.1
54
+ - num_epochs: 10
55
+ - mixed_precision_training: Native AMP
56
+
57
+ ### Training results
58
+
59
+ | Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall |
60
+ |:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|
61
+ | 0.5866 | 0.32 | 200 | 0.2772 | 0.7188 | 0.6785 | 0.7640 |
62
+ | 0.4701 | 0.64 | 400 | 0.2204 | 0.7867 | 0.7535 | 0.8230 |
63
+ | 0.4275 | 0.96 | 600 | 0.1895 | 0.8191 | 0.7932 | 0.8467 |
64
+ | 0.3282 | 1.28 | 800 | 0.1970 | 0.8339 | 0.8155 | 0.8531 |
65
+ | 0.2545 | 1.6 | 1000 | 0.1765 | 0.8553 | 0.8427 | 0.8684 |
66
+ | 0.2703 | 1.92 | 1200 | 0.1528 | 0.8626 | 0.8512 | 0.8744 |
67
+ | 0.1658 | 2.24 | 1400 | 0.1862 | 0.8610 | 0.8476 | 0.8748 |
68
+ | 0.1571 | 2.56 | 1600 | 0.1882 | 0.8617 | 0.8464 | 0.8776 |
69
+ | 0.1604 | 2.88 | 1800 | 0.1715 | 0.8760 | 0.8638 | 0.8884 |
70
+ | 0.0633 | 3.2 | 2000 | 0.2327 | 0.8656 | 0.8443 | 0.8880 |
71
+ | 0.0925 | 3.52 | 2200 | 0.2032 | 0.8757 | 0.8641 | 0.8876 |
72
+ | 0.0730 | 3.84 | 2400 | 0.2121 | 0.8730 | 0.8596 | 0.8868 |
73
+
74
+
75
+ ### Framework versions
76
+
77
+ - Transformers 5.1.0
78
+ - Pytorch 2.10.0+cu128
79
+ - Datasets 4.7.0
80
+ - Tokenizers 0.22.2
config.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "gelu",
3
+ "allow_embedding_resizing": true,
4
+ "architectures": [
5
+ "ModernBertForTokenClassification"
6
+ ],
7
+ "attention_bias": false,
8
+ "attention_dropout": 0.0,
9
+ "attention_layer": "rope",
10
+ "attention_probs_dropout_prob": 0.0,
11
+ "attn_out_bias": false,
12
+ "attn_out_dropout_prob": 0.1,
13
+ "attn_qkv_bias": false,
14
+ "bert_layer": "prenorm",
15
+ "bos_token_id": null,
16
+ "classifier_activation": "gelu",
17
+ "classifier_bias": false,
18
+ "classifier_dropout": 0.0,
19
+ "classifier_pooling": "cls",
20
+ "cls_token_id": 50281,
21
+ "compile_model": true,
22
+ "decoder_bias": true,
23
+ "deterministic_flash_attn": false,
24
+ "dtype": "float32",
25
+ "embed_dropout_prob": 0.0,
26
+ "embed_norm": true,
27
+ "embedding_dropout": 0.0,
28
+ "embedding_layer": "sans_pos",
29
+ "eos_token_id": null,
30
+ "final_norm": true,
31
+ "global_attn_every_n_layers": 3,
32
+ "head_pred_act": "gelu",
33
+ "hidden_act": "gelu",
34
+ "hidden_activation": "gelu",
35
+ "hidden_size": 768,
36
+ "id2label": {
37
+ "0": "O",
38
+ "1": "B-PER",
39
+ "2": "I-PER",
40
+ "3": "B-ORG",
41
+ "4": "I-ORG",
42
+ "5": "B-LOC",
43
+ "6": "I-LOC"
44
+ },
45
+ "init_method": "full_megatron",
46
+ "initializer_cutoff_factor": 2.0,
47
+ "initializer_range": 0.02,
48
+ "intermediate_size": 1152,
49
+ "label2id": {
50
+ "B-LOC": 5,
51
+ "B-ORG": 3,
52
+ "B-PER": 1,
53
+ "I-LOC": 6,
54
+ "I-ORG": 4,
55
+ "I-PER": 2,
56
+ "O": 0
57
+ },
58
+ "layer_types": [
59
+ "full_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "full_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "full_attention",
69
+ "sliding_attention",
70
+ "sliding_attention",
71
+ "full_attention",
72
+ "sliding_attention",
73
+ "sliding_attention",
74
+ "full_attention",
75
+ "sliding_attention",
76
+ "sliding_attention",
77
+ "full_attention",
78
+ "sliding_attention",
79
+ "sliding_attention",
80
+ "full_attention"
81
+ ],
82
+ "local_attention": 256,
83
+ "local_attn_rotary_emb_base": 10000.0,
84
+ "loss_function": "fa_cross_entropy",
85
+ "loss_kwargs": {
86
+ "reduction": "mean"
87
+ },
88
+ "masked_prediction": true,
89
+ "max_position_embeddings": 8192,
90
+ "mlp_bias": false,
91
+ "mlp_dropout": 0.0,
92
+ "mlp_dropout_prob": 0.0,
93
+ "mlp_in_bias": false,
94
+ "mlp_layer": "glu",
95
+ "mlp_out_bias": false,
96
+ "model_type": "modernbert",
97
+ "norm_bias": false,
98
+ "norm_eps": 1e-05,
99
+ "norm_kwargs": {
100
+ "bias": false,
101
+ "eps": 1e-05
102
+ },
103
+ "normalization": "layernorm",
104
+ "num_attention_heads": 12,
105
+ "num_hidden_layers": 22,
106
+ "pad_token_id": 50283,
107
+ "padding": "unpadded",
108
+ "repad_logits_with_grad": false,
109
+ "rope_parameters": {
110
+ "full_attention": {
111
+ "rope_theta": 160000.0,
112
+ "rope_type": "default"
113
+ },
114
+ "sliding_attention": {
115
+ "rope_theta": 10000.0,
116
+ "rope_type": "default"
117
+ }
118
+ },
119
+ "rotary_emb_base": 160000.0,
120
+ "rotary_emb_dim": null,
121
+ "rotary_emb_interleaved": false,
122
+ "rotary_emb_scale_base": null,
123
+ "sep_token_id": 50282,
124
+ "skip_first_prenorm": true,
125
+ "sparse_pred_ignore_index": -100,
126
+ "sparse_prediction": false,
127
+ "tie_word_embeddings": true,
128
+ "transformers_version": "5.1.0",
129
+ "unpad_embeddings": true,
130
+ "use_cache": false,
131
+ "vocab_size": 50368
132
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9b1d5fd0c86b635ec0a28a037e54a2bd243a5aaf35be84271fa1164d7d9a664
3
+ size 598455164
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "clean_up_tokenization_spaces": true,
4
+ "cls_token": "[CLS]",
5
+ "is_local": false,
6
+ "mask_token": "[MASK]",
7
+ "model_input_names": [
8
+ "input_ids",
9
+ "attention_mask"
10
+ ],
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "pad_token": "[PAD]",
13
+ "sep_token": "[SEP]",
14
+ "tokenizer_class": "TokenizersBackend",
15
+ "unk_token": "[UNK]"
16
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:755d25366aa1e870d304816f42afb3aa2062896aa1199fd4581ed3177f4c7470
3
+ size 5201