File size: 2,071 Bytes
5a53b54 16c2c7e 5a53b54 f3ee0b6 5a53b54 16c2c7e 5a53b54 16c2c7e 5a53b54 16c2c7e 5a53b54 16c2c7e 5a53b54 f3ee0b6 5a53b54 16c2c7e 5a53b54 16c2c7e 5a53b54 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | ---
library_name: transformers
license: apache-2.0
base_model: answerdotai/ModernBERT-base
tags:
- generated_from_trainer
metrics:
- precision
- recall
- f1
- accuracy
model-index:
- name: edu-modernbert
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# edu-modernbert
This model is a fine-tuned version of [answerdotai/ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) on the [HuggingFaceFW/fineweb-edu-llama3-annotations](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu-llama3-annotations) dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2453
- Precision: 0.5901
- Recall: 0.5245
- F1: 0.5504
- Accuracy: 0.7508
- Binary Precision: 0.8168
- Binary Recall: 0.6856
- Binary F1: 0.7455
- Binary Accuracy: 0.9578
<div class="alert alert-info">
<b>Note:</b> the binary classification score is calculated by thresholding at 3 i.e (0-2 -> 0, 3-5 -> 1).
</div>
In comparison the reproduced version of [HuggingFaceFW/fineweb-edu-classifier](https://huggingface.co/HuggingFaceFW/fineweb-edu-classifier) achieves:
- Loss: 0.2475
- Precision: 0.5595
- Recall: 0.4360
- F1: 0.4704
- Accuracy: 0.7123
- Binary Precision: 0.7781
- Binary Recall: 0.5566
- Binary F1: 0.6490
- Binary Accuracy: 0.9457
<div class="alert alert-info">
<b>Note:</b> one difference is that ModernBERT-base is fully trained while the original classifier trains only the regression head..
</div>
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 256
- eval_batch_size: 256
- seed: 0
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 20(totally not needed, 3 epochs already achieve great results)
### Framework versions
- Transformers 4.48.0.dev0
- Pytorch 2.5.1+cu121
- Datasets 3.2.0
- Tokenizers 0.21.0
|