Instructions to use LineLS/LegalBERT-optimized-with-validation-check with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LineLS/LegalBERT-optimized-with-validation-check with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="LineLS/LegalBERT-optimized-with-validation-check")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("LineLS/LegalBERT-optimized-with-validation-check") model = AutoModelForTokenClassification.from_pretrained("LineLS/LegalBERT-optimized-with-validation-check", device_map="auto") - Notebooks
- Google Colab
- Kaggle
LegalBERT-optimized-with-validation-check
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: 0.0964
- Precision: 0.8591
- Recall: 0.8595
- F1: 0.8593
- Accuracy: 0.9588
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: 2.325564413937065e-05
- train_batch_size: 8
- eval_batch_size: 8
- 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
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| 0.1737 | 1.0 | 3013 | 0.1575 | 0.7949 | 0.7961 | 0.7955 | 0.9402 |
| 0.1254 | 2.0 | 6026 | 0.1286 | 0.8300 | 0.8302 | 0.8301 | 0.9511 |
| 0.1007 | 3.0 | 9039 | 0.1016 | 0.8483 | 0.8486 | 0.8484 | 0.9562 |
Framework versions
- Transformers 4.52.4
- Pytorch 2.6.0+cu124
- Datasets 2.14.4
- Tokenizers 0.21.1
- Downloads last month
- 15
Model tree for LineLS/LegalBERT-optimized-with-validation-check
Base model
nlpaueb/legal-bert-base-uncased