--- license: mit tags: - generated_from_trainer metrics: - accuracy - precision - recall base_model: law-ai/InLegalBERT model-index: - name: InLegalBERT-lora results: [] --- # InLegalBERT-lora This model is a fine-tuned version of [law-ai/InLegalBERT](https://huggingface.co/law-ai/InLegalBERT) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 0.6344 - Accuracy: 0.8203 - Precision: 0.8092 - Recall: 0.8203 - Precision Macro: 0.6487 - Recall Macro: 0.6625 - Macro Fpr: 0.0160 - Weighted Fpr: 0.0154 - Weighted Specificity: 0.9771 - Macro Specificity: 0.9865 - Weighted Sensitivity: 0.8203 - Macro Sensitivity: 0.6625 - F1 Micro: 0.8203 - F1 Macro: 0.6461 - F1 Weighted: 0.8125 ## 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: 15 ### 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.2013 | 0.6553 | 0.6007 | 0.6553 | 0.3279 | 0.3903 | 0.0365 | 0.0362 | 0.9556 | 0.9741 | 0.6553 | 0.3903 | 0.6553 | 0.3420 | 0.6147 | | No log | 2.0 | 321 | 0.8279 | 0.7382 | 0.7211 | 0.7382 | 0.4092 | 0.4658 | 0.0248 | 0.0247 | 0.9713 | 0.9806 | 0.7382 | 0.4658 | 0.7382 | 0.4250 | 0.7237 | | No log | 3.0 | 482 | 0.7130 | 0.7545 | 0.7255 | 0.7545 | 0.4800 | 0.4770 | 0.0233 | 0.0227 | 0.9701 | 0.9816 | 0.7545 | 0.4770 | 0.7545 | 0.4431 | 0.7305 | | 1.1985 | 4.0 | 643 | 0.6922 | 0.7823 | 0.7594 | 0.7823 | 0.5188 | 0.5283 | 0.0200 | 0.0195 | 0.9740 | 0.9838 | 0.7823 | 0.5283 | 0.7823 | 0.5048 | 0.7660 | | 1.1985 | 5.0 | 803 | 0.6710 | 0.7940 | 0.7734 | 0.7940 | 0.5450 | 0.5571 | 0.0190 | 0.0182 | 0.9739 | 0.9845 | 0.7940 | 0.5571 | 0.7940 | 0.5257 | 0.7718 | | 1.1985 | 6.0 | 964 | 0.6455 | 0.7971 | 0.7757 | 0.7971 | 0.5353 | 0.5622 | 0.0184 | 0.0179 | 0.9754 | 0.9848 | 0.7971 | 0.5622 | 0.7971 | 0.5316 | 0.7790 | | 0.5721 | 7.0 | 1125 | 0.6395 | 0.8002 | 0.7801 | 0.8002 | 0.5443 | 0.5784 | 0.0181 | 0.0175 | 0.9762 | 0.9851 | 0.8002 | 0.5784 | 0.8002 | 0.5486 | 0.7845 | | 0.5721 | 8.0 | 1286 | 0.6317 | 0.8025 | 0.7833 | 0.8025 | 0.5439 | 0.5773 | 0.0178 | 0.0173 | 0.9765 | 0.9853 | 0.8025 | 0.5773 | 0.8025 | 0.5475 | 0.7874 | | 0.5721 | 9.0 | 1446 | 0.6137 | 0.8009 | 0.7828 | 0.8009 | 0.5593 | 0.5842 | 0.0179 | 0.0174 | 0.9765 | 0.9852 | 0.8009 | 0.5842 | 0.8009 | 0.5609 | 0.7875 | | 0.4166 | 10.0 | 1607 | 0.6249 | 0.8156 | 0.8055 | 0.8156 | 0.6398 | 0.6430 | 0.0165 | 0.0159 | 0.9772 | 0.9862 | 0.8156 | 0.6430 | 0.8156 | 0.6305 | 0.8067 | | 0.4166 | 11.0 | 1768 | 0.6426 | 0.8125 | 0.8014 | 0.8125 | 0.6397 | 0.6520 | 0.0169 | 0.0162 | 0.9762 | 0.9859 | 0.8125 | 0.6520 | 0.8125 | 0.6372 | 0.8042 | | 0.4166 | 12.0 | 1929 | 0.6305 | 0.8164 | 0.8050 | 0.8164 | 0.6358 | 0.6526 | 0.0164 | 0.0158 | 0.9770 | 0.9862 | 0.8164 | 0.6526 | 0.8164 | 0.6372 | 0.8083 | | 0.3406 | 13.0 | 2089 | 0.6276 | 0.8203 | 0.8102 | 0.8203 | 0.6418 | 0.6467 | 0.0160 | 0.0154 | 0.9774 | 0.9865 | 0.8203 | 0.6467 | 0.8203 | 0.6353 | 0.8129 | | 0.3406 | 14.0 | 2250 | 0.6428 | 0.8187 | 0.8079 | 0.8187 | 0.6467 | 0.6618 | 0.0162 | 0.0156 | 0.9771 | 0.9864 | 0.8187 | 0.6618 | 0.8187 | 0.6446 | 0.8107 | | 0.3406 | 14.93 | 2400 | 0.6344 | 0.8203 | 0.8092 | 0.8203 | 0.6487 | 0.6625 | 0.0160 | 0.0154 | 0.9771 | 0.9865 | 0.8203 | 0.6625 | 0.8203 | 0.6461 | 0.8125 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.18.0 - Tokenizers 0.15.1