I built a small LLM on my MacBook Air.
15 years old. 1 laptop. ~4 minutes of training. $0.
The idea: instead of trying to build a frontier model from scratch (which costs $200,000+ in compute), borrow a model like Meta's free Llama 3.2 1B Instruct and teach it a new trick.
The recipe
- Base model: Llama 3.2 1B Instruct, 4-bit quantized (free from Meta)
- Dataset: 2,000 SQL examples from Hugging Face (
b-mc2/sql-create-context) - Method: LoRA fine-tuning: trained only 0.228% of the model's parameters
- Library: Apple MLX, built for M-chips
- Hardware: MacBook Air M3, 16 GB RAM
- Time: ~4 minutes, 300 iterations
The result
Before fine-tuning, asking the model "Show me all students in 10th grade" gave a chatty 72-token markdown response that treated the user like a beginner. After fine-tuning, the same prompt produced a clean 39-token SQL query, ready to paste into a database.
What I took away
- AI isn't magic. It's math, data, and a lot of training.
- You don't need a $200K supercomputer to do real ML.
- Fine-tuning > pre-training for almost anyone who isn't a frontier lab.
- Apple Silicon is genuinely good for this.
- If a 9th grader can build a real LLM specialist on a MacBook Air, so can you.
Tools: karpathy/nanochat · Hugging Face · Apple MLX