Skip to content

Instantly share code, notes, and snippets.

View fabagaipo's full-sized avatar
🏊
just keep swimming

F fabagaipo

🏊
just keep swimming
View GitHub Profile
#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*
Function Declarations for builtin shell commands:
*/
@fabagaipo
fabagaipo / grpo_demo.py
Created January 31, 2025 12:00 — 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