Skip to content

Instantly share code, notes, and snippets.

View GrubBox's full-sized avatar

Sandeep GrubBox

  • Freelancer
  • Location : FreeWorld
  • 02:54 (UTC +05:30)
View GitHub Profile
@willccbb
willccbb / grpo_demo.py
Last active May 9, 2025 03:34
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer