Instructions to use Rakesh44/odyssey-fin-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Rakesh44/odyssey-fin-sentiment with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("Rakesh44/medhakosha-base") model = PeftModel.from_pretrained(base_model, "Rakesh44/odyssey-fin-sentiment") - Notebooks
- Google Colab
- Kaggle
https://huggingface.co/Rakesh44/odyssey-fin-sentiment
A LoRA adapter fine-tuned on top of Rakesh44/odyssey for [TASK โ e.g. financial sentiment analysis / market sentiment classification]. This repository contains the adapter weights only; the base model is loaded separately and the adapter is applied on top.
Model Details
- Developed by: Rakesh44
- **Base model: https://huggingface.co/Rakesh44/odyssey
- Task: Sequence classification (
SEQ_CLS) - Number of labels: positive / neutral / negative
- Adapter type: LoRA (PEFT)
- Language: English
- License: Apache 2.0
LoRA Configuration
| Setting | Value |
|---|---|
| PEFT type | LoRA |
| Rank (r) | 16 |
| Alpha | 32 |
| Dropout | 0.05 |
| Bias | none |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Modules saved (full) | score / classifier head |
| RSLoRA / DoRA / QALoRA | disabled |
| PEFT version | 0.19.1 |
The adapter targets the attention projections only; the classification head (score/classifier) is trained in full and saved with the adapter.
Uses
Intended use
Classifying the sentiment of financial or market text โ headlines, reports, commentary โ into fixed categories.
Out of scope
Not intended for text generation, question answering, or high-stakes automated decisions. Predictions on financial or market text should be independently validated before any real-world use.
How to Use
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel
import torch
base_id = "Rakesh44/odyssey"
adapter_id = "Rakesh44/odyssey-fin-sentiment"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForSequenceClassification.from_pretrained(
base_id, num_labels=[NUM_LABELS]
)
model = PeftModel.from_pretrained(base, adapter_id)
model.eval()
text = "The company beat earnings expectations this quarter."
inputs = tokenizer(text, return_tensors="pt", truncation=True)
with torch.no_grad():
logits = model(**inputs).logits
pred = logits.argmax(-1).item()
print(model.config.id2label[pred])
Training
- Method: LoRA fine-tuning (attention projections) with a fully-trained classification head
- Hardware: 1ร GPU
- Downloads last month
- 1
Model tree for Rakesh44/odyssey-fin-sentiment
Base model
Rakesh44/odyssey