Downloads · 30 days
20
11% of all-time downloads
stay-mellow-ai/gemma-3-1b-reasoning
gemma-3-1b-reasoning is a text generation model from stay-mellow-ai. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
A Gemma 3 1B model fine-tuned with GRPO for mathematical reasoning on the GSM8K dataset. The model generates explicit step-by-step reasoning before providing final answers.
Downloads · 30 days
20
11% of all-time downloads
All-time downloads
176
Public
Parameters
1000M
2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2 GB · 98%
From the Hugging Face model README
A Gemma 3 1B model fine-tuned with GRPO for mathematical reasoning on the GSM8K dataset. The model generates explicit step-by-step reasoning before providing final answers.
Base Model: Gemma 3 1B Instruct (4-bit)
Method: GRPO (Group Relative Policy Optimization)
Dataset: OpenAI GSM8K
LoRA Config: r=8, alpha=8, targeting attention and MLP layers
Training used multiple reward functions to enforce structured output format and answer accuracy.
<start_working_out>
[Step-by-step reasoning]
<end_working_out>
<SOLUTION>[Answer]</SOLUTION>
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="colesmcintosh/mellow-gemma-3-reasoning",
max_seq_length=16000,
)
system_prompt = """You are given a problem.
Think about the problem and provide your working out.
Place it between <start_working_out> and <end_working_out>.
Then, provide your solution between <SOLUTION></SOLUTION>"""
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "If 5 apples cost $10, how much do 8 apples cost?"}
]
text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
outputs = model.generate(**tokenizer(text, return_tensors="pt").to("cuda"), max_new_tokens=256)
Gemma License - see terms
Trained with Unsloth