Downloads · 30 days
12
29% of all-time downloads
srikar-v05/Qwen2.5-3B-GRPO-16bit
Qwen2.5-3B-GRPO-16bit is a machine learning model from srikar-v05. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of Qwen2.5-3B-Instruct using GRPO (Group Relative Policy Optimization) with multiple reward functions to encourage structured reasoning and correct answers on math word problems (GSM…
Downloads · 30 days
12
29% of all-time downloads
All-time downloads
42
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
How the weights are stored.
F162.8B · 90%
From the Hugging Face model README
This model is a fine-tuned version of Qwen2.5-3B-Instruct using GRPO (Group Relative Policy Optimization) with multiple reward functions to encourage structured reasoning and correct answers on math word problems (GSM8K). It has been trained in 16-bit merged LoRA format for easier inference and deployment.
<reasoning> and <answer> blocksThe model was trained to produce structured answers in the following format:
<reasoning>
Step-by-step reasoning here...
</reasoning>
<answer>
Final concise answer here
</answer>
The GRPO training used multiple rewards:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("srikar-v05/Qwen2.5-3B-GRPO-16bit")
tokenizer = AutoTokenizer.from_pretrained("srikar-v05/Qwen2.5-3B-GRPO-16bit")
messages = [
{"role": "system", "content": "Respond in <reasoning>...</reasoning><answer>...</answer> format."},
{"role": "user", "content": "Sarah has 12 apples. She gives 4 apples to her friend and eats 2 herself. How many apples does Sarah have left?"},
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0]))
Input:
How many r’s are in strawberry?
Output:
<reasoning>
The word "strawberry" has 10 letters. The letter "r" appears 3 times.
</reasoning>
<answer>
3
</answer>
Not intended for: high-stakes decision-making, sensitive applications, or domains requiring factual accuracy beyond math reasoning.