Skip to content

Instantly share code, notes, and snippets.

View alexmcroberts's full-sized avatar

Alex McRoberts alexmcroberts

View GitHub Profile
@alexmcroberts
alexmcroberts / grpo_demo.py
Created January 31, 2025 04:25 — 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
@alexmcroberts
alexmcroberts / .git hooks post-merge
Created October 17, 2016 17:05 — forked from anonymous/.git hooks post-merge
are there migrations to run in Migration folder?
#!/bin/sh
#
# This hook parses the Migrations directory and counts if there are any migrations to run.
# If there are no migrations, nothing will show - leaving the developer in peace :)
git log -m -1 --name-only --pretty="format:" &> new_migrations.log
COUNTER=0
while read CMD; do
if [[ $CMD == *Migration* ]]
then
@alexmcroberts
alexmcroberts / .Title
Created September 29, 2015 19:42 — forked from congjf/.Title
Using MongoDB in golang with mgo
Using MongoDB in golang with mgo