Edit model card

Fine-tuned BERTImbau for legal texts classification

This model is a fine-tuned version of neuralmind/bert-large-portuguese-cased on a dataset containing summaries of TJSP decisions, with the purpose of classyfing the text on 5 legal areas. It achieves the following results on the evaluation set:

  • Loss: 0.5813
  • Accuracy: 0.8713

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-06
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 3.0

Training results

Training Loss Epoch Step Validation Loss Accuracy
0.2709 1.0 8509 0.5307 0.8388
0.2388 2.0 17018 0.4947 0.8692
0.1761 3.0 25527 0.5813 0.8713

Framework versions

  • Transformers 4.41.2
  • Pytorch 2.3.1+cu118
  • Datasets 2.20.0
  • Tokenizers 0.19.1
Downloads last month
3
Safetensors
Model size
334M params
Tensor type
F32
·
Inference API
This model can be loaded on Inference API (serverless).

Finetuned from