Skip to content

Instantly share code, notes, and snippets.

View spencersgoogle's full-sized avatar

Spencer Shumway spencersgoogle

View GitHub Profile
@spencersgoogle
spencersgoogle / finetune_run.py
Created June 3, 2026 22:45
Gemma fine-tuning script to execute with the colab CLI
import os
os.system("pip install -q -U 'bitsandbytes>=0.46.1'")
# WARNING: Don't commit this file with a real token.
os.environ["HF_TOKEN"] = "my API Key"
import torch
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig