--- license: cc-by-sa-4.0 base_model: nlpaueb/legal-bert-base-uncased tags: - generated_from_trainer metrics: - accuracy - precision - recall model-index: - name: legal-bert-lora results: [] --- # legal-bert-lora This model is a fine-tuned version of [nlpaueb/legal-bert-base-uncased](https://huggingface.co/nlpaueb/legal-bert-base-uncased) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 0.7058 - Accuracy: 0.7847 - Precision: 0.7702 - Recall: 0.7847 - Precision Macro: 0.5452 - Recall Macro: 0.5400 - Macro Fpr: 0.0199 - Weighted Fpr: 0.0192 - Weighted Specificity: 0.9737 - Macro Specificity: 0.9839 - Weighted Sensitivity: 0.7847 - Macro Sensitivity: 0.5400 - F1 Micro: 0.7847 - F1 Macro: 0.5165 - F1 Weighted: 0.7676 ## 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: 5e-05 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - gradient_accumulation_steps: 4 - total_train_batch_size: 32 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | Precision Macro | Recall Macro | Macro Fpr | Weighted Fpr | Weighted Specificity | Macro Specificity | Weighted Sensitivity | Macro Sensitivity | F1 Micro | F1 Macro | F1 Weighted | |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:---------------:|:------------:|:---------:|:------------:|:--------------------:|:-----------------:|:--------------------:|:-----------------:|:--------:|:--------:|:-----------:| | No log | 1.0 | 160 | 1.3252 | 0.6297 | 0.5643 | 0.6297 | 0.2865 | 0.3110 | 0.0417 | 0.0403 | 0.9455 | 0.9717 | 0.6297 | 0.3110 | 0.6297 | 0.2742 | 0.5694 | | No log | 2.0 | 321 | 0.8870 | 0.7312 | 0.6873 | 0.7312 | 0.3742 | 0.4525 | 0.0257 | 0.0256 | 0.9690 | 0.9800 | 0.7312 | 0.4525 | 0.7312 | 0.3967 | 0.6996 | | No log | 3.0 | 482 | 0.7794 | 0.7483 | 0.7169 | 0.7483 | 0.4059 | 0.4680 | 0.0239 | 0.0235 | 0.9711 | 0.9813 | 0.7483 | 0.4680 | 0.7483 | 0.4262 | 0.7282 | | 1.2835 | 4.0 | 643 | 0.7481 | 0.7444 | 0.7085 | 0.7444 | 0.3997 | 0.4588 | 0.0243 | 0.0239 | 0.9700 | 0.9810 | 0.7444 | 0.4588 | 0.7444 | 0.4100 | 0.7146 | | 1.2835 | 5.0 | 803 | 0.7360 | 0.7630 | 0.7245 | 0.7630 | 0.4176 | 0.4763 | 0.0226 | 0.0217 | 0.9702 | 0.9822 | 0.7630 | 0.4763 | 0.7630 | 0.4350 | 0.7372 | | 1.2835 | 6.0 | 964 | 0.7146 | 0.7738 | 0.7790 | 0.7738 | 0.5020 | 0.4907 | 0.0209 | 0.0205 | 0.9730 | 0.9831 | 0.7738 | 0.4907 | 0.7738 | 0.4514 | 0.7549 | | 0.6494 | 7.0 | 1125 | 0.7362 | 0.7607 | 0.7519 | 0.7607 | 0.5232 | 0.4890 | 0.0225 | 0.0220 | 0.9724 | 0.9822 | 0.7607 | 0.4890 | 0.7607 | 0.4556 | 0.7390 | | 0.6494 | 8.0 | 1286 | 0.7271 | 0.7800 | 0.7639 | 0.7800 | 0.5348 | 0.5171 | 0.0205 | 0.0197 | 0.9731 | 0.9835 | 0.7800 | 0.5171 | 0.7800 | 0.4923 | 0.7617 | | 0.6494 | 9.0 | 1446 | 0.7068 | 0.7847 | 0.7739 | 0.7847 | 0.5495 | 0.5205 | 0.0199 | 0.0192 | 0.9744 | 0.9839 | 0.7847 | 0.5205 | 0.7847 | 0.4943 | 0.7665 | | 0.5284 | 9.95 | 1600 | 0.7058 | 0.7847 | 0.7702 | 0.7847 | 0.5452 | 0.5400 | 0.0199 | 0.0192 | 0.9737 | 0.9839 | 0.7847 | 0.5400 | 0.7847 | 0.5165 | 0.7676 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.18.0 - Tokenizers 0.15.1