Gemma 2 2B - GRPO Math Solver ๐Ÿงฎ๐Ÿง 

This model is a fine-tuned version of google/gemma-2-2b-it, specifically optimized for solving mathematical word problems. It was trained on the GSM8K benchmark using Group Relative Policy Optimization (GRPO) via the JAX-native Tunix library.

The model was developed and submitted as part of the Google Tunix Hackathon hosted on Kaggle.

๐Ÿš€ Model Details

  • Base Architecture: Gemma 2 (2B Parameters, Instruction Tuned)
  • Task: Mathematical Reasoning & High-Precision Problem Solving
  • Dataset: GSM8K (Grade School Math 8K)
  • Training Algorithm: GRPO (Group Relative Policy Optimization)
  • Hardware: Trained on a Google v5e-8 TPU.
  • Format: JAX/Tunix checkpoints.

โš™๏ธ Training Hyperparameters (LoRA & GRPO)

To reduce hallucinations and encourage logical step-by-step thinking ("Show your work"), the model was fine-tuned using Low-Rank Adaptation (LoRA) integrated with a low-temperature GRPO setup.

LoRA Config:

  • Rank: 64
  • Alpha: 64.0

GRPO & Generation Config:

  • Max Prompt Length: 256
  • Total Generation Steps: 512
  • Temperature: 0.6 (Optimized for math: less chaotic, highly logical, yet diverse enough for GRPO)
  • Top-P: 0.95 (Cuts off the 5% least likely tokens to prevent hallucinations)
  • Top-K: 50
  • Num Generations: 4
  • Beta / Epsilon: 0.08 / 0.2

Training Details:

  • Learning Rate: 3e-6 (AdamW, Cosine Scheduler)
  • Weight Decay: 0.1
  • Max Grad Norm: 0.1
  • Training Steps: 1000 batches (Micro-batch size: 2)

๐Ÿง  Why GRPO?

Instead of standard Supervised Fine-Tuning (SFT), this model utilizes GRPO, a Reinforcement Learning (RL) algorithm that enhances reasoning abilities. By generating multiple responses for a given prompt and evaluating them via a reward model, it calculates a relative advantage to update the policy without the heavy memory footprint of a separate value model.

๐Ÿ† Hackathon Context

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for tslapczynski/gemma-2-2b-it-grpo-gsm8k

Adapter
(486)
this model