Instructions to use 3huvan/uklegalbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 3huvan/uklegalbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="3huvan/uklegalbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("3huvan/uklegalbert") model = AutoModelForSequenceClassification.from_pretrained("3huvan/uklegalbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
uklegalbert
This model is a fine-tuned version of nlpaueb/legal-bert-base-uncased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.3891
- Macro F1: 0.4109
- Weighted F1: 0.6221
- Accuracy: 0.6447
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 32
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 5
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Macro F1 | Weighted F1 | Accuracy |
|---|---|---|---|---|---|---|
| 0.7645 | 1.0 | 1320 | 1.1541 | 0.4695 | 0.6510 | 0.6630 |
| 0.4536 | 2.0 | 2640 | 1.4663 | 0.4178 | 0.6098 | 0.6242 |
| 0.2191 | 3.0 | 3960 | 1.7202 | 0.4225 | 0.6154 | 0.6270 |
| 0.1215 | 4.0 | 5280 | 2.1909 | 0.4125 | 0.6180 | 0.6417 |
| 0.0520 | 5.0 | 6600 | 2.3891 | 0.4109 | 0.6221 | 0.6447 |
Framework versions
- Transformers 5.12.0
- Pytorch 2.5.1+cu121
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 89
Model tree for 3huvan/uklegalbert
Base model
nlpaueb/legal-bert-base-uncased