zbigi's picture
End of training
65cbc82 verified
---
license: mit
library_name: peft
tags:
- generated_from_trainer
base_model: openai-community/gpt2
datasets:
- financial_phrasebank
metrics:
- accuracy
model-index:
- name: gpt2-sentiment_analysis
results: []
---
<!-- 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. -->
# gpt2-sentiment_analysis
This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on the financial_phrasebank dataset.
It achieves the following results on the evaluation set:
- Loss: 0.6571
- Accuracy: {'accuracy': 0.8239339752407153}
## 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: 0.0006
- train_batch_size: 4
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- 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 |
|:-------------:|:------:|:----:|:---------------:|:--------------------------------:|
| No log | 0.9981 | 257 | 0.4654 | {'accuracy': 0.8239339752407153} |
| 0.6288 | 2.0 | 515 | 0.4266 | {'accuracy': 0.8266850068775791} |
| 0.6288 | 2.9981 | 772 | 0.4558 | {'accuracy': 0.8225584594222833} |
| 0.3201 | 4.0 | 1030 | 0.4550 | {'accuracy': 0.811554332874828} |
| 0.3201 | 4.9981 | 1287 | 0.4223 | {'accuracy': 0.8294360385144429} |
| 0.2464 | 6.0 | 1545 | 0.4637 | {'accuracy': 0.8335625859697386} |
| 0.2464 | 6.9981 | 1802 | 0.5243 | {'accuracy': 0.8184319119669876} |
| 0.1859 | 8.0 | 2060 | 0.5482 | {'accuracy': 0.8335625859697386} |
| 0.1859 | 8.9981 | 2317 | 0.6443 | {'accuracy': 0.8335625859697386} |
| 0.1381 | 9.9806 | 2570 | 0.6571 | {'accuracy': 0.8239339752407153} |
### Framework versions
- PEFT 0.11.1
- Transformers 4.41.0
- Pytorch 2.3.0+cu121
- Datasets 2.19.1
- Tokenizers 0.19.1