edu-modernbert

This model is a fine-tuned version of answerdotai/ModernBERT-base on the 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
Note: the binary classification score is calculated by thresholding at 3 i.e (0-2 -> 0, 3-5 -> 1).

In comparison the reproduced version of 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
Note: one difference is that ModernBERT-base is fully trained while the original classifier trains only the regression head..

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
Downloads last month
5
Safetensors
Model size
150M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for staghado/edu-modernbert

Finetuned
(45)
this model