Downloads · 30 days
0
Phonsiri/gemma-2-2b-it-grpo-v6-checkpoints
gemma-2-2b-it-grpo-v6-checkpoints is a reinforcement learning model from Phonsiri. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as gemma.
This model is a fine-tuned version of google/gemma-2-2b-it using Group Relative Policy Optimization (GRPO). It has been trained to improve reasoning capabilities and Chain-of-Thought (CoT) generation.
Downloads · 30 days
0
Access
Public
Updated Jan 26, 2026
Repo size
2.7 GB
Likes
0
Public
Click a slice to open those files.
.safetensors83.1 MB · 68%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-2-2b-it using Group Relative Policy Optimization (GRPO). It has been trained to improve reasoning capabilities and Chain-of-Thought (CoT) generation.
This model was trained using GRPO (Group Relative Policy Optimization), a method introduced in DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. Unlike traditional RLHF (PPO), GRPO eliminates the need for a separate critic model (Value Function) by estimating the baseline from the group of outputs generated for the same prompt, making training more efficient and stable.
from transformers import pipeline
model_id = "Phonsiri/gemma-2-2b-it-grpo-v6-checkpoints"
generator = pipeline("text-generation", model=model_id, device="cuda")
question = "A store sells notebooks for $3 each and pens for $1.50 each. Sarah buys 4 notebooks and 6 pens. How much does she pay in total?"
output = generator([{"role": "user", "content": question}], max_new_tokens=512, return_full_text=False)
print(output["generated_text"])
If you are loading this as an adapter on top of the base model:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "google/gemma-2-2b-it"
adapter_model_id = "Phonsiri/gemma-2-2b-it-grpo-v6-checkpoints"
# Load Base Model
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
device_map="auto",
torch_dtype=torch.float16
)
# Load Adapter
model = PeftModel.from_pretrained(base_model, adapter_model_id)
# Inference
prompt = "Explain the concept of GRPO in simple terms."
messages = [{"role": "user", "content": prompt}]
formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted_prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs, skip_special_tokens=True))
The model was fine-tuned using the TRL library with the GRPOTrainer.
Phonsiri/gemma3-instruct-reasoning-mix (Synthetic CoT data generated via Google AI Studio).The model was evaluated using LM Evaluation Harness across standard benchmarks. The results show improvements in reasoning tasks (ARC Challenge) and STEM knowledge, while maintaining stability in other areas compared to the base model.
Evaluation Settings:
| Benchmark | Base Model | GRPO v6 | Delta | Status |
|---|---|---|---|---|
| ARC Challenge | 55.50% | 56.50% | <span style="color:green">+1.00%</span> | 🟢 Improved |
| GSM8k | 45.50% | 45.50% | 0.00% | ⚪ Stable |
| HellaSwag | 72.50% | 72.50% | 0.00% | ⚪ Stable |
| MMLU Overall | 59.27% | 59.37% | <span style="color:green">+0.10%</span> | ⚪ Stable |
| — MMLU STEM | 49.40% | 49.84% | <span style="color:green">+0.44%</span> | ⚪ Stable |
| — MMLU Humanities | 61.40% | 61.09% | <span style="color:red">-0.31%</span> | ⚪ Stable |
| — MMLU SocialSci | 68.57% | 68.87% | <span style="color:green">+0.29%</span> | ⚪ Stable |
| — MMLU Other | 60.78% | 60.69% | <span style="color:red">-0.09%</span> | ⚪ Stable |
| Average Accuracy | 58.20% | 58.35% | +0.15% | 🟢 Slight Improvement |
Note: The improvements in ARC Challenge (+1.00%) and MMLU STEM (+0.44%) suggest that the GRPO fine-tuning with reasoning datasets has successfully enhanced the model's logical reasoning and scientific knowledge capabilities.
Cite GRPO as:
@article{shao2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300},
}
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}