Downloads · 30 days
3
13% of all-time downloads
gherke/mistral-7b-quantized-lora-finetuned
mistral-7b-quantized-lora-finetuned is a machine learning model from gherke. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
This is a financial sentiment analysis model, fine-tuned for fine-tuned for sentiment analysis to return a sentiment score between -1 (very negative) and 1 (very positive). It was specifically trained to analyze finan…
Downloads · 30 days
3
13% of all-time downloads
All-time downloads
24
Public
Repo size
9 MB
Likes
1
Public
Click a slice to open those files.
.safetensors8.4 MB · 76%
From the Hugging Face model README
This is a financial sentiment analysis model, fine-tuned for fine-tuned for sentiment analysis to return a sentiment score between -1 (very negative) and 1 (very positive). It was specifically trained to analyze financial news and assess its impact on financial market trends.
This is a quantized version of the Mistral-7B model, fine-tuned using the LoRA (Low-Rank Adaptation) technique for sentiment analysis tasks. The model was trained on the takala/financial_phrasebank dataset to detect sentiment related to economic or market-relevant information. The output is a single sentiment score, with values between -1 and 1, representing very negative to very positive sentiment respectively.
The model can be used for analyzing financial news and producing a sentiment score that indicates the potential impact on financial market trends.
The model can be incorporated into larger financial analysis pipelines or trading bots to assess market sentiment.
The model should not be used for general sentiment analysis outside of the financial context, as it was specifically trained on financial news.
The model is limited by the nature of its training dataset (takala/financial_phrasebank), which may not be representative of all financial scenarios or market conditions. It may produce biased results if applied to other sectors.
Users (both direct and downstream) should be aware of the risks, biases, and limitations of the model. Careful consideration is needed when applying the sentiment scores in automated trading decisions, as biases in the data can lead to incorrect assessments.
Use the code below to get started with the model:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "gherke/mistral-7b-quantized-lora-finetuned"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
The model was fine-tuned on the takala/financial_phrasebank dataset, which contains financial news phrases labeled for sentiment (positive, negative, neutral).
The financial news phrases were tokenized and preprocessed using the Hugging Face tokenizer, with truncation applied for long texts.
Training was performed using an 8-bit paged AdamW optimizer, with gradient accumulation steps set to 4.
The model was evaluated on the test split of the takala/financial_phrasebank dataset.
The evaluation was performed based on the model's ability to accurately predict sentiment labels in financial contexts.
Mean Squared Error (MSE) and correlation with human-labeled sentiment scores were used to evaluate model performance.
The model achieved reasonable accuracy in predicting sentiment scores within the financial domain, performing well on positive and negative examples but showing some difficulty in identifying neutral cases.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
The model is based on the Mistral-7B architecture, with LoRA applied for efficient fine-tuning in the sentiment analysis task.
The model was trained on a single NVIDIA A100 GPU with 40 GB VRAM.
For further questions or inquiries about this model, please reach out to Gabriella Herke.
For more information, contact Gabriella Herke at [contact information].