Skip to content

Instantly share code, notes, and snippets.

View thecatfix's full-sized avatar
💬
Will reply if u direct mention me on GitHub or Twitter/X.

John Shelburne thecatfix

💬
Will reply if u direct mention me on GitHub or Twitter/X.
View GitHub Profile
@thecatfix
thecatfix / deepseekthis.py
Last active January 31, 2025 02:07 — 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