Hands-On Large Language Models
by O'Reilly (Jay Alammar & Maarten Grootendorst)
The highly visual O'Reilly guide to using and understanding LLMs, by the author of The Illustrated Transformer.
Overview
Hands-On Large Language Models: Language Understanding and Generation (O'Reilly, 2024) is written by Jay Alammar — creator of the widely read 'The Illustrated Transformer' — and Maarten Grootendorst, and uses over 250 custom illustrations to make LLMs concrete. The book walks Python developers from the fundamentals (token embeddings, the Transformer architecture and attention, tokenizers) through practical application patterns: using pretrained models for copywriting and summarization, building semantic search and retrieval-augmented generation (RAG) systems that go beyond keyword matching, text classification and clustering, prompt engineering, and fine-tuning both representation and generative models. Every chapter pairs conceptual explanation with runnable Python examples, and the official companion GitHub repository provides free, executable notebooks for each chapter, making it a strong bridge from intuition to working code.
At a Glance
- Topic
- Models
- Level
- Intermediate
- Format
- Book
- Cost
- Paid
- Duration
- ~425 pages
- Provider
- O'Reilly (Jay Alammar & Maarten Grootendorst)
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓How tokenizers, token embeddings, and the Transformer attention mechanism actually work
- ✓Use pretrained LLMs for summarization, copywriting, classification, and clustering
- ✓Build semantic search and retrieval-augmented generation (RAG) pipelines
- ✓Apply prompt engineering and fine-tune representation and generative models
- ✓Turn LLM concepts into runnable Python via the book's companion notebooks
Highlights
- •250+ custom illustrations from the author of The Illustrated Transformer
- •Free companion GitHub repo with executable notebooks per chapter
- •Balances conceptual intuition with practical, hands-on code
Who It’s For
Best For
- ✓Python developers moving from LLM user to LLM builder
- ✓Engineers who want a visual, intuition-first grounding in how LLMs work
- ✓Practitioners implementing search, RAG, or fine-tuning for the first time
Prerequisites
- •Working Python knowledge
- •Basic machine learning familiarity (helpful but not required)
FAQ
What is Hands-On Large Language Models?
A hands-on, richly illustrated O'Reilly book (2024) by Jay Alammar and Maarten Grootendorst that teaches Python developers to use and understand large language models in practice — from tokenizers and Transformer internals to semantic search, RAG, classification, and fine-tuning, with runnable code.
Is Hands-On Large Language Models free?
Hands-On Large Language Models is a paid resource.
What level is Hands-On Large Language Models for?
Hands-On Large Language Models is aimed at a intermediate audience. Recommended background: Working Python knowledge, Basic machine learning familiarity (helpful but not required).
How long does Hands-On Large Language Models take?
Expect roughly ~425 pages. Most learners work through it at their own pace.
What will I learn from Hands-On Large Language Models?
You'll learn: How tokenizers, token embeddings, and the Transformer attention mechanism actually work; Use pretrained LLMs for summarization, copywriting, classification, and clustering; Build semantic search and retrieval-augmented generation (RAG) pipelines; Apply prompt engineering and fine-tune representation and generative models; Turn LLM concepts into runnable Python via the book's companion notebooks.