
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# legal_bert_small

This model is a fine-tuned version of [nlpaueb/legal-bert-base-uncased](https://huggingface.co/nlpaueb/legal-bert-base-uncased) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 2.0455
- Accuracy: 0.815
- Precision: 0.5
- Recall: 0.3784
- F1: 0.4308
- D-index: 1.5791

## 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: 4
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1600
- num_epochs: 20
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     | D-index |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|:-------:|
| No log        | 1.0   | 200  | 0.4205          | 0.84     | 0.7778    | 0.1892 | 0.3043 | 1.5473  |
| No log        | 2.0   | 400  | 0.5287          | 0.785    | 0.425     | 0.4595 | 0.4416 | 1.5664  |
| 0.4788        | 3.0   | 600  | 0.8663          | 0.78     | 0.4146    | 0.4595 | 0.4359 | 1.5597  |
| 0.4788        | 4.0   | 800  | 1.0432          | 0.8      | 0.4681    | 0.5946 | 0.5238 | 1.6309  |
| 0.2168        | 5.0   | 1000 | 1.2325          | 0.795    | 0.375     | 0.1622 | 0.2264 | 1.4766  |
| 0.2168        | 6.0   | 1200 | 1.3369          | 0.815    | 0.5       | 0.2432 | 0.3273 | 1.5326  |
| 0.2168        | 7.0   | 1400 | 1.4949          | 0.785    | 0.4286    | 0.4865 | 0.4557 | 1.5754  |
| 0.0682        | 8.0   | 1600 | 1.4499          | 0.815    | 0.5       | 0.3514 | 0.4127 | 1.5700  |
| 0.0682        | 9.0   | 1800 | 1.7761          | 0.8      | 0.4348    | 0.2703 | 0.3333 | 1.5218  |
| 0.0154        | 10.0  | 2000 | 1.8939          | 0.805    | 0.4375    | 0.1892 | 0.2642 | 1.5000  |
| 0.0154        | 11.0  | 2200 | 1.9630          | 0.8      | 0.4211    | 0.2162 | 0.2857 | 1.5028  |
| 0.0154        | 12.0  | 2400 | 1.9712          | 0.805    | 0.4545    | 0.2703 | 0.3390 | 1.5286  |
| 0.0132        | 13.0  | 2600 | 1.9184          | 0.805    | 0.4737    | 0.4865 | 0.4800 | 1.6021  |
| 0.0132        | 14.0  | 2800 | 1.9261          | 0.805    | 0.4706    | 0.4324 | 0.4507 | 1.5841  |
| 0.0           | 15.0  | 3000 | 1.9619          | 0.815    | 0.5       | 0.4054 | 0.4478 | 1.5883  |
| 0.0           | 16.0  | 3200 | 1.9798          | 0.82     | 0.5172    | 0.4054 | 0.4545 | 1.5949  |
| 0.0           | 17.0  | 3400 | 2.0126          | 0.815    | 0.5       | 0.3784 | 0.4308 | 1.5791  |
| 0.0           | 18.0  | 3600 | 2.0203          | 0.82     | 0.5185    | 0.3784 | 0.4375 | 1.5858  |
| 0.0           | 19.0  | 3800 | 2.0286          | 0.82     | 0.5185    | 0.3784 | 0.4375 | 1.5858  |
| 0.0           | 20.0  | 4000 | 2.0455          | 0.815    | 0.5       | 0.3784 | 0.4308 | 1.5791  |


### Framework versions

- Transformers 4.28.0
- Pytorch 2.0.1+cu118
- Datasets 2.12.0
- Tokenizers 0.13.3

{"license": "cc-by-sa-4.0", "tags": ["generated_from_trainer"], "metrics": ["accuracy", "precision", "recall", "f1"], "model-index": [{"name": "legal_bert_small", "results": []}]}
transformers pytorch bert text-classification generated_from_trainer license:cc-by-sa-4.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #bert #text-classification #generated_from_trainer #license-cc-by-sa-4.0 #autotrain_compatible #endpoints_compatible #region-us 

legal\_bert\_small
==================


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.0455
* Accuracy: 0.815
* Precision: 0.5
* Recall: 0.3784
* F1: 0.4308
* D-index: 1.5791


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: 4
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 1600
* num\_epochs: 20
* mixed\_precision\_training: Native AMP


### Training results



### Framework versions


* Transformers 4.28.0
* Pytorch 2.0.1+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 4
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 1600
* num\_epochs: 20
* mixed\_precision\_training: Native AMP ### Training results ### Framework versions


* Transformers 4.28.0
* Pytorch 2.0.1+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3
TAGS
#transformers #pytorch #bert #text-classification #generated_from_trainer #license-cc-by-sa-4.0 #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 4
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 1600
* num\_epochs: 20
* mixed\_precision\_training: Native AMP ### Training results ### Framework versions


* Transformers 4.28.0
* Pytorch 2.0.1+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3