Skip to content

Instantly share code, notes, and snippets.

View oxillix's full-sized avatar

oxillix

  • Belgium
View GitHub Profile
@oxillix
oxillix / grpo_demo.py
Created February 13, 2025 22:58 — 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
@oxillix
oxillix / autoSpotifyPause.py
Created March 16, 2021 18:28
Auto-stopping Spotify while other programs play audio | auto pause spotify when another source starts playing
#!/usr/bin/env python
# pip install dbus-python pulsectl
import signal
import sys
import pulsectl
import dbus
def sig_handler(signal, frame):