What problem does it solve? Fine-tuning runs fail in expensive ways: scripts raise TypeError on transformers 5 / trl 1 APIs, OOMs get misdiagnosed, benchmark scores are inflated by data leakage, and preference runs inherit SFT learning rates. This Skill encodes the memory arithmetic, API migrations, dataset hygiene order, and evaluation discipline needed to plan and review training runs before GPU hours are spent. ## Core Features & Use Cases - Memory ledger and OOM triage: Computes the four memory terms (weights, gradients, optimizer state, activations) via scripts/vram_ledger.py, names the dominant term, and applies the fixed remedy order starting with expandable_segments. - Method selection and hyperparameter guardrails: Chooses between SFT, DPO, GRPO, LoRA, QLoRA, and full fine-tuning based on data shape, with verified trl 1.13 defaults (SFT 2e-5 vs DPO/GRPO 1e-6) and GRPO batch divisibility checks. - Dataset hygiene and evaluation: Runs scripts/dataset_overlap.py to detect exact, near-duplicate, and cross-split n-gram leakage (n=13), enforces dedup-before-split ordering, and requires base-model baselines plus regression suites. - Use Case: Before launching an 8B full fine-tune on one A100, run the ledger to show it needs ~119 GiB of model state alone, switch to LoRA, fix the trl 1.13 config renames, and gate the pipeline on the overlap check. ## Quick Start Ask the agent to review my training script and run notes, compute the memory ledger for my hardware, and tell me whether the run fits and what to change first.