johnpaulett's picture
Update README.md
3cad264 verified
metadata
library_name: transformers
license: apache-2.0
base_model: answerdotai/ModernBERT-base
tags:
  - generated_from_trainer
metrics:
  - f1
model-index:
  - name: ModernRadBERT-cui-classifier
    results: []

ModernRadBERT-cui-classifier

This model is a fine-tuned version of answerdotai/ModernBERT-base on the unsloth/Radiology_mini dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1454
  • Precision Micro: 0.8664
  • Recall Micro: 0.7217
  • F1: 0.7874
  • Precision Macro: 0.6973
  • Recall Macro: 0.4836
  • F1 Macro: 0.5480
  • Exact Match: 0.6580
  • Hamming Loss: 0.0327
  • Label Accuracy: 0.9673

https://www.johnpaulett.com/2025/modernbert-radiology-fine-tuning-classifier/

Model description

More information needed

Intended uses & limitations

Not intended for real-world use, was an example of MLM fine-tuning on a small radiology dataset.

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 20

Training results

Training Loss Epoch Step Validation Loss Precision Micro Recall Micro F1 Precision Macro Recall Macro F1 Macro Exact Match Hamming Loss Label Accuracy
0.1371 1.0 205 0.1214 0.8169 0.6679 0.7350 0.4170 0.3481 0.3667 0.5681 0.0404 0.9596
0.0904 2.0 410 0.1054 0.8704 0.6833 0.7656 0.5391 0.3744 0.4106 0.6029 0.0351 0.9649
0.0458 3.0 615 0.1012 0.8316 0.7582 0.7932 0.5899 0.5157 0.5251 0.6580 0.0332 0.9668
0.0216 4.0 820 0.1134 0.8738 0.7044 0.7800 0.7129 0.4338 0.5071 0.6377 0.0333 0.9667
0.01 5.0 1025 0.1194 0.8382 0.7159 0.7723 0.6707 0.4817 0.5336 0.6290 0.0354 0.9646
0.0047 6.0 1230 0.1224 0.8721 0.7332 0.7967 0.6475 0.4692 0.5187 0.6638 0.0314 0.9686
0.0024 7.0 1435 0.1228 0.8540 0.7409 0.7934 0.7016 0.5071 0.5648 0.6725 0.0324 0.9676
0.0012 8.0 1640 0.1289 0.8744 0.7217 0.7907 0.7053 0.4852 0.5531 0.6609 0.0320 0.9680
0.0009 9.0 1845 0.1323 0.8765 0.7217 0.7916 0.7063 0.4831 0.5512 0.6667 0.0319 0.9681
0.0007 10.0 2050 0.1337 0.8765 0.7217 0.7916 0.7059 0.4809 0.5493 0.6609 0.0319 0.9681
0.0006 11.0 2255 0.1357 0.8744 0.7217 0.7907 0.7044 0.4809 0.5488 0.6609 0.0320 0.9680
0.0006 12.0 2460 0.1373 0.8701 0.7198 0.7878 0.7027 0.4805 0.5476 0.6638 0.0325 0.9675
0.0005 13.0 2665 0.1395 0.8684 0.7217 0.7883 0.6977 0.4827 0.5477 0.6638 0.0325 0.9675
0.0005 14.0 2870 0.1410 0.8701 0.7198 0.7878 0.7029 0.4815 0.5488 0.6580 0.0325 0.9675
0.0005 15.0 3075 0.1426 0.8644 0.7217 0.7866 0.6957 0.4818 0.5466 0.6551 0.0329 0.9671
0.0004 16.0 3280 0.1432 0.8670 0.7255 0.7900 0.6976 0.4872 0.5508 0.6580 0.0324 0.9676
0.0004 17.0 3485 0.1442 0.8687 0.7236 0.7895 0.6981 0.4849 0.5492 0.6580 0.0324 0.9676
0.0004 18.0 3690 0.1448 0.8670 0.7255 0.7900 0.6985 0.4872 0.5510 0.6580 0.0324 0.9676
0.0004 19.0 3895 0.1451 0.8647 0.7236 0.7879 0.6963 0.4849 0.5485 0.6580 0.0327 0.9673
0.0004 20.0 4100 0.1454 0.8664 0.7217 0.7874 0.6973 0.4836 0.5480 0.6580 0.0327 0.9673

Framework versions

  • Transformers 4.48.0.dev0
  • Pytorch 2.5.1+cu121
  • Datasets 3.2.0
  • Tokenizers 0.21.0