metadata
library_name: transformers
license: apache-2.0
base_model: samchain/econo-sentence-v2
tags:
- generated_from_trainer
- finance
metrics:
- accuracy
- f1
- precision
- recall
model-index:
- name: EconoSentiment
results: []
datasets:
- FinanceMTEB/financial_phrasebank
language:
- en
pipeline_tag: text-classification
EconoSentiment
This model is a fine-tuned version of samchain/econo-sentence-v2 on the Financial Phrase Bank dataset from FinanceMTEB. The full model is trained using a small learning rate isntead of freezing the encoder. Hence, you should not use the encoder of this model for a task other than sentiment analysis.
It achieves the following results on the evaluation set:
- Loss: 0.1293
- Accuracy: 0.962
- F1: 0.9619
- Precision: 0.9619
- Recall: 0.962
Model description
The base model is a sentence-transformers model built from EconoBert.
Intended uses & limitations
This model is trained to provide a useful tool for sentiment analysis in finance.
Training and evaluation data
The dataset is directly downloaded from the huggingface repo of the FinanceMTEB. The preprocessing consisted of tokenizing to a fixed sequence length of 512 tokens.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 8
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 100
- num_epochs: 2
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
---|---|---|---|---|---|---|---|
0.5992 | 1.0 | 158 | 0.4854 | 0.805 | 0.7692 | 0.8108 | 0.805 |
0.0985 | 2.0 | 316 | 0.1293 | 0.962 | 0.9619 | 0.9619 | 0.962 |
Framework versions
- Transformers 4.50.0
- Pytorch 2.1.0+cu118
- Datasets 3.4.1
- Tokenizers 0.21.1