This repository contains the codebase for training and evaluating a tiny language model (Qwen-2.5-0.5B and Qwen-2.5-0.5B-Instruct) on mathematical reasoning tasks (GSM8K).
The pipeline consists of three stages:
- Zero-Shot Evaluation: Establishing a baseline.
- Supervised Fine-Tuning (SFT): Teaching the model the reasoning format.
- Reinforcement Learning (GRPO): Optimizing the model using verifiable rewards without a critic model.
python evaluation/main.py \
--model_signature $MODEL_SIGNATURE \
--output_path ./outputs/$MODEL_SIGNATURE-zero-shot
python finetuning/main.py \
--model_signature $MODEL_SIGNATURE \
--output_path ./checkpoints/$MODEL_SIGNATURE-sft \
--wandb_token <YOUR_WANDB_API_KEY> \
python grpo/main.py \
--model_signature $MODEL_SIGNATURE \
--adapter_path ./checkpoints/$MODEL_SIGNATURE-sft \
--output_path ./checkpoints/$MODEL_SIGNATURE-sft_grpo \
--wandb_token <YOUR_WANDB_API_KEY>