Fine-tune Gemma 4 on a single 16GB GPU with QLoRA
fine-tuning & quantization
// what it does
QLoRA loads the base model in 4-bit and trains small low-rank adapters on top, so an E4B fine-tune fits on a single 16 GB GPU (a free Colab or Kaggle T4). Unsloth's FastModel wraps this with Gemma 4 defaults; typical settings are r=16, lora_alpha=16, targeting the attention and MLP projections. pip install unsloth pulls the trainer and its patched kernels.
// shell
$ pip install unsloth// gotcha
Preserve reasoning by keeping chain-of-thought examples the majority of your data — Google suggests roughly 75%+ CoT — or thinking mode degrades after fine-tuning.