Skip to content

Instantly share code, notes, and snippets.

View stargeizer's full-sized avatar
🎯
Focusing

Ludi stargeizer

🎯
Focusing
View GitHub Profile
@stargeizer
stargeizer / grpo_demo.py
Created February 1, 2025 05:17 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
### Keybase proof
I hereby claim:
* I am stargeizer on github.
* I am cryptophys (https://keybase.io/cryptophys) on keybase.
* I have a public key ASBVFB8iUz-_Yv5qwu-Z-ke07PtB6tJQQSY_0Y7xs2_P_Ao
To claim this, I am signing this object: