Small Language Models
This playlist comes from a book, not a live class or a course notebook: How to Build and Fine-Tune a Small Language Model, by J. Paul Liu. It's a lean book, more of a practical project script with code than a theory brick, and that's a compliment: every chapter comes with a dollar cost estimate, a training time, a minimum hardware spec attached. Seeing an ML book tell you "this costs 50 dollars and takes an hour" before throwing you into a sea of math is rare, and I wanted to pull that thread with you.
The book's full plan is ambitious, 12 chapters going from "why train your own model" all the way to production deployment with ethics and everything. For now I'm covering the first two: Chapter 1, the case for why a small specialized model beats a generalist giant in plenty of real scenarios, and Chapter 2, which builds a character-level GPT from scratch, the same classic exercise from Andrej Karpathy's "Let's Build GPT" video (the book credits this openly). If more posts on the following chapters happen, I'll come back here, but for now that's it.
A funny detail before we start: the book's table of contents opens with a section called "AI Use Disclaimer". So the author used AI to help write a book teaching you to build AI, and I use uncle Claude to write this blog about the book. It's AI all the way down, but at least nobody here is pretending otherwise.
Playlists · 2 posts
- SLM vs LLM: the Delivery Bike and the Moving Truck
Chapter 1 of J. Paul Liu's book argues the giant model isn't always the right call. I tell it through the most Brazilian metaphor I know (a delivery bike vs a moving truck) and check the real cost numbers the book uses.
- Teaching a GPT From Scratch to Write Like a 19th-Century Brazilian Novelist
Chapter 2 builds a tiny GPT from scratch, the same classic exercise from Karpathy's video. I clean-transcribe my entire notebook here, cell by cell, full code, comparing against the original notebook and finding real bugs along the way.