Downloads · 30 days
18
7% of all-time downloads
staedi/sentiment-gemma-3
sentiment-gemma-3 is a text generation model from staedi. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as gemma.
This model staedi/sentiment-gemma-3 was converted to MLX format from mlx-community/gemma-3-4b-it-4bit using mlx-lm version 0.31.0.
Downloads · 30 days
18
7% of all-time downloads
All-time downloads
252
Public
Parameters
4.6B
4.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.8 GB · 99%
How the weights are stored.
U324.6B · 100%
From the Hugging Face model README
This model staedi/sentiment-gemma-3 was converted to MLX format from mlx-community/gemma-3-4b-it-4bit using mlx-lm version 0.31.0.
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("staedi/sentiment-gemma-3")
prompt = (
"You are a financial analyst specializing in directed sentiment extraction. "
"Given a financial news text, identify all mentioned entities and determine "
"the sentiment directed toward each one. Return your answer as a JSON array "
"where each element has: \"entity\" (name), \"entity_type\" (\"ORG\" for "
"companies/organizations, \"PERSON\" for individuals, \"GPE\" for countries/"
"cities/regions, \"OTHER\" for anything else), \"polarity\" (+ positive, "
"- negative, 0 neutral, ~ context-dependent), and \"category\" (one of: Legal, "
"Business, Performance, Recruitment, NewsRelease, Bankruptcy)."
)
text = "Apple announced its earnings. The company performed well."
user_content = f"Extract the directed financial sentiment from the following text:\n\n{text}"
if tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=Falsse, add_generation_prompt=True, return_dict=False,
)
response = generate(model, tokenizer, prompt=prompt, verbose=False)