davanstrien HF Staff commited on
Commit
754a071
·
verified ·
1 Parent(s): d237b3f

davanstrien/modernbert-hf-dataset-domain-v1

Browse files
Files changed (4) hide show
  1. README.md +69 -0
  2. config.json +102 -0
  3. model.safetensors +3 -0
  4. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: answerdotai/ModernBERT-base
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: modernbert-output
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # modernbert-output
18
+
19
+ This model is a fine-tuned version of [answerdotai/ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.6180
22
+ - Accuracy: 0.8867
23
+ - Macro F1: 0.8872
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - learning_rate: 2e-05
43
+ - train_batch_size: 4
44
+ - eval_batch_size: 4
45
+ - seed: 42
46
+ - gradient_accumulation_steps: 4
47
+ - total_train_batch_size: 16
48
+ - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
49
+ - lr_scheduler_type: linear
50
+ - num_epochs: 5
51
+ - mixed_precision_training: Native AMP
52
+
53
+ ### Training results
54
+
55
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Macro F1 |
56
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|
57
+ | 3.0392 | 1.0 | 140 | 0.6617 | 0.8267 | 0.8251 |
58
+ | 1.4070 | 2.0 | 280 | 0.5377 | 0.8733 | 0.8759 |
59
+ | 0.5328 | 3.0 | 420 | 0.6954 | 0.86 | 0.8646 |
60
+ | 0.3036 | 4.0 | 560 | 0.6180 | 0.8867 | 0.8872 |
61
+ | 0.0971 | 5.0 | 700 | 0.6528 | 0.88 | 0.8813 |
62
+
63
+
64
+ ### Framework versions
65
+
66
+ - Transformers 5.3.0
67
+ - Pytorch 2.11.0+cu130
68
+ - Datasets 4.8.4
69
+ - Tokenizers 0.22.2
config.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertForSequenceClassification"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 50281,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 50281,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "float32",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50282,
18
+ "global_attn_every_n_layers": 3,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 768,
22
+ "id2label": {
23
+ "0": "biology",
24
+ "1": "chemistry",
25
+ "2": "climate",
26
+ "3": "code",
27
+ "4": "cybersecurity",
28
+ "5": "finance",
29
+ "6": "legal",
30
+ "7": "math",
31
+ "8": "medical",
32
+ "9": "none"
33
+ },
34
+ "initializer_cutoff_factor": 2.0,
35
+ "initializer_range": 0.02,
36
+ "intermediate_size": 1152,
37
+ "label2id": {
38
+ "biology": 0,
39
+ "chemistry": 1,
40
+ "climate": 2,
41
+ "code": 3,
42
+ "cybersecurity": 4,
43
+ "finance": 5,
44
+ "legal": 6,
45
+ "math": 7,
46
+ "medical": 8,
47
+ "none": 9
48
+ },
49
+ "layer_norm_eps": 1e-05,
50
+ "layer_types": [
51
+ "full_attention",
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "full_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "full_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "full_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "full_attention",
64
+ "sliding_attention",
65
+ "sliding_attention",
66
+ "full_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "full_attention",
70
+ "sliding_attention",
71
+ "sliding_attention",
72
+ "full_attention"
73
+ ],
74
+ "local_attention": 128,
75
+ "max_position_embeddings": 8192,
76
+ "mlp_bias": false,
77
+ "mlp_dropout": 0.0,
78
+ "model_type": "modernbert",
79
+ "norm_bias": false,
80
+ "norm_eps": 1e-05,
81
+ "num_attention_heads": 12,
82
+ "num_hidden_layers": 22,
83
+ "pad_token_id": 50283,
84
+ "position_embedding_type": "absolute",
85
+ "rope_parameters": {
86
+ "full_attention": {
87
+ "rope_theta": 160000.0,
88
+ "rope_type": "default"
89
+ },
90
+ "sliding_attention": {
91
+ "rope_theta": 10000.0,
92
+ "rope_type": "default"
93
+ }
94
+ },
95
+ "sep_token_id": 50282,
96
+ "sparse_pred_ignore_index": -100,
97
+ "sparse_prediction": false,
98
+ "tie_word_embeddings": true,
99
+ "transformers_version": "5.3.0",
100
+ "use_cache": false,
101
+ "vocab_size": 50368
102
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f75fcc66c10b8fc27a43c22f0b5c6039fb9a6f43da89c228df51df652d040039
3
+ size 598464400
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b77be74738b5f414a0df4d278fc41accfcc7ab59c3a84940ca627f468bb33528
3
+ size 5201