Downloads · 30 days
0
seifelzeiny/finetuned-tinyllama-finmarba
finetuned-tinyllama-finmarba is a machine learning model from seifelzeiny. 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 transformers. The card lists the license as mit.
TinyLlama fine-tuned to answer financial news headlines sentiment Q&A, using the FinMarBa dataset. This model predicts sentiment (Negative/Neutral) from financial headlines in English via causal language modeling.
Downloads · 30 days
0
Access
Public
Updated Nov 19, 2025
Repo size
5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors4.5 MB · 52%
From the Hugging Face model README
TinyLlama fine-tuned to answer financial news headlines sentiment Q&A, using the FinMarBa dataset.
This model predicts sentiment (Negative/Neutral) from financial headlines in English via causal language modeling.
Sentiment Q&A for financial headlines:
Can be extended for broader financial NLP tasks:
For academic or research use.
Validate outputs before applying to production finance systems.
Future work should expand to multi-class and multi-lingual sentiment coverage.
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("seifelzeiny/finetuned-tinyllama-finmarba")
tokenizer = AutoTokenizer.from_pretrained("seifelzeiny/finetuned-tinyllama-finmarba")
prompt = "### Question: What is the sentiment of this news?\nFederal Reserve raises rates.\n### Answer:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=32)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
0 = Negative, 1 = Neutral; excluded -1 Unknown).-1) labels, mapped headlines and sentiments to Q&A format.Model achieves near-equal training and validation loss, indicating good generalization without overfitting (see loss table above).
Direct accuracy scores are not used due to causal LM format, but manual validation shows plausible sentiment answers.
@misc{seifelzeiny2025finmarba, author = {Seif Basha}, title = {Finetuned TinyLlama for Financial News Sentiment Q&A (FinMarBa)}, year = {2025}, url = {https://huggingface.co/seifelzeiny/finetuned-tinyllama-finmarba}, note = {Financial NLP, LoRA, FinMarBa, TinyLlama} }