Team Ai
Modelpublic

nickmuchi/distilroberta-finetuned-financial-text-classification

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
20likes501downloads
Model Card

distilroberta-finetuned-financial-text-classification

This model is a fine-tuned version of distilroberta-base on the sentence_50Agree financial-phrasebank + Kaggle Dataset, a dataset consisting of 4840 Financial News categorised by sentiment (negative, neutral, positive). The Kaggle dataset includes Covid-19 sentiment data and can be found here: sentiment-classification-selflabel-dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.4463
  • —F1: 0.8835

Model description

Model determines the financial sentiment of given text. Given the unbalanced distribution of the class labels, the weights were adjusted to pay attention to the less sampled labels which should increase overall performance. The Covid dataset was added in order to enrich the model, given most models have not been trained on the impact of Covid-19 on earnings or markets.

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 2e-05
  • —trainbatchsize: 64
  • —evalbatchsize: 64
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —num_epochs: 10
  • —mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossF1
0.73091.0720.36710.8441
0.37572.01440.31990.8709
0.30543.02160.30960.8678
0.22294.02880.37760.8390
0.17445.03600.36780.8723
0.14366.04320.37280.8758
0.10447.05040.41160.8744
0.09318.05760.41480.8761
0.06839.06480.44230.8837
0.061110.07200.44630.8835

Framework versions

  • —Transformers 4.15.0
  • —Pytorch 1.10.0+cu111
  • —Datasets 1.18.0
  • —Tokenizers 0.10.3