Downloads · 30 days
9
13% of all-time downloads
Sigmafox/qwen2.5-0.5B-finance-summarizer
qwen2.5-0.5B-finance-summarizer is a summarization model from Sigmafox. Use it when you need a shorter version of a longer text. The card lists the license as apache-2.0.
Fine-tuned version of Qwen/Qwen2.5-0.5B-Instruct on financial news summarization.
Downloads · 30 days
9
13% of all-time downloads
All-time downloads
68
Public
Parameters
494M
2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 99%
From the Hugging Face model README
Fine-tuned version of Qwen/Qwen2.5-0.5B-Instruct on financial news summarization.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("Sigmafox/qwen2.5-0.5B-finance-summarizer")
tokenizer = AutoTokenizer.from_pretrained("Sigmafox/qwen2.5-0.5B-finance-summarizer")
messages = [
{"role": "system", "content": "You are a financial analyst. Summarize financial news clearly."},
{"role": "user", "content": "Summarize this financial news headline: Apple reports record quarterly earnings"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))