Downloads · 30 days
0
MrPathak29/llama32-1b-sentiment-mlx-lora-v5
llama32-1b-sentiment-mlx-lora-v5 is a machine learning model from MrPathak29. 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 mlx. The card lists the license as llama3.2.
This repo contains LoRA adapters fine-tuned on Apple Silicon (MacBook Pro M4 Pro, 24GB unified memory) using MLX-LM.
Downloads · 30 days
0
Access
Public
Updated Jan 24, 2026
Repo size
295 MB
Likes
0
Public
Click a slice to open those files.
.safetensors293 MB · 99%
From the Hugging Face model README
This repo contains LoRA adapters fine-tuned on Apple Silicon (MacBook Pro M4 Pro, 24GB unified memory) using MLX-LM.
The model predicts a continuous sentiment score in [-1, 1] from financial/news text.
Given a news snippet, output a single float between -1 and 1 (inclusive).
No additional text.
MrPathak29/news-sentiment-score-prompt-v5mlx_lm.lora)Metric: MAE / RMSE over float predictions (coverage 100%)
| Model | Coverage | MAE | RMSE |
|---|---|---|---|
Base (meta-llama/Llama-3.2-1B-Instruct) | 1.0 | 0.2999 | 0.3789 |
| Fine-tuned (this adapter) | 1.0 | 0.1092 | 0.1771 |
Relative improvement:
import re
from mlx_lm import load, generate
BASE_MODEL = "meta-llama/Llama-3.2-1B-Instruct"
ADAPTER_PATH = "./adapters_sentiment_1b_v5" # or downloaded repo folder
model, tokenizer = load(BASE_MODEL, adapter_path=ADAPTER_PATH)
news = "Stocks surged after strong quarterly earnings and upbeat guidance."
prompt = (
"You are a financial sentiment scorer.\n"
"Return a single number between -1 and 1 (inclusive). No words.\n\n"
f"News:\n{news}\n\n"
"Score:\n"
)
messages = [{"role": "user", "content": prompt}]
prompt_chat = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
out = generate(model, tokenizer, prompt=prompt_chat, max_tokens=16)
print(out) # e.g. "0.1432"