Small model for finance use cases fine-tuned on a QA dataset. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("umarigan/llama3.2-1B-fin")
model = AutoModelForCausalLM.from_pretrained("umarigan/llama3.2-1B-fin")
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""
inputs = tokenizer(
[
alpaca_prompt.format(
"How this article will effect stock price of Pfizer", # Görev
"""(Reuters) -Drugmaker Pfizer on Tuesday said it was expecting its 2025 profits to be nearly in line with Wall Street expectations as it seeks to fend off criticism over its turnaround strategy from activist hedge fund Starboard Value.
Shares of the company rose nearly 3% in premarket trading.
The company expects adjusted profit of $2.80 to $3 per share, compared with analysts' average estimate of $2.88 per share, according to data compiled by LSEG.
Pfizer has been reining in costs and cutting debt by shedding non-core businesses as its rebuilds itself post a sharp slump in sales of COVID-19 products.
Its shares have fallen nearly 12% this year and trade at about half their value during the peak of the COVID-19 pandemic as revenue slows down and several top-selling drugs come off patent.
That has left it open to investor criticism, with Starboard in October saying that Pfizer's management has over-spent on big acquisitions and failed to produce profitable new drugs from those deals or from its internal research and development.
Pfizer forecast 2025 revenue in the range of $61 billion to $64 billion, compared with the estimates of $63.26 billion.
The company is slated to hold a conference call with analysts later in the day to discuss the forecast.
(Reporting by Mariam Sunny and Manas Mishra; Editing by Anil D'Silva)
""", # İnput
"", # Response - Leave empty!
)
], return_tensors = "pt")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
tokenizer.batch_decode(outputs)
Output:
### Response:\nPfizer is expected to see a significant increase in its profits in 2025.
The company is planning to hold a conference call with analysts later in the day to discuss the forecast.<|eot_id|>
- Downloads last month
- 26
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.