This project contains codes for the research paper title "Pre-trained Large Language Models for Financial Sentiment Analysis". Authors: Wei Luo, Dihong Gong.
hostfile.txt
should contain the IP addresses for distributed training, one line per IP.env_a800.sh
should contain all the additional custom environment variables for running the codes.
- Split the train, val and test sets for the PhraseBank dataset:
process_financial_phrasebank.py
- May need to tune some parameters accordingly.
- Execute the training script with
./train.sh
- Execute the testing script with
torchrun test.py
Methods | Accuracy |
---|---|
LSTM | 0.71 |
LSTM with ELMo | 0.75 |
ULMFit | 0.83 |
LPS | 0.71 |
HSC | 0.71 |
FinBERT | 0.86 |
Ours (Few-shots) |
0.68 |
Ours (SFT) |
0.90 |
Ours (3-class classification) |
0.90 |