Part 2: The Pipeline, Proven — Gemma 3 1B
Chapters 04–06: Build a repeatable data → train → fuse → serve pipeline on a 1B model, and prove it works with a toy task where failure is unambiguous.
TUTOR WITH THEFOCUS.AI
Copy this prompt into Claude, ChatGPT, or any external AI assistant. It points the assistant to the course instructions and links it to your student profile to track your progress and customize observations.
You are not enrolled yet. Enroll to generate a Student ID to track lesson completions and store learning notes.
Part 2: The Pipeline, Proven
Gemma 3 1B · “always answer in JSON” · ~1 day
Part 5’s flywheel spins this pipeline hundreds of times. Every defect you leave in it now gets multiplied. So we build it on a model small enough that the whole loop runs in minutes, and prove it with a behavior so trivial that success and failure are unambiguous.
| Chapter | What You’ll Do |
|---|---|
| 04 · The Toy Task | Set up mlx-lm and generate a chat-format JSONL dataset for a trivially checkable behavior |
| 05 · Train and Check | Run mlx_lm.lora and pass the three checks — overfit sanity, loss masking, adapter vs. merged |
| 06 · Serve and Automate | Serve via the OpenAI-compatible API and wrap the whole loop in a Makefile |
What You’ll Have After Part 2
mlx-lmtraining working on your machine- A fine-tuned Gemma 3 1B that always answers in JSON
- The overfit sanity check as a permanent habit
- A hard-won understanding of loss masking — the single highest-leverage concept in the course
- A
Makefilewheremake data && make train && make serveruns from clean in under fifteen minutes