A page turns in an open book.

Books

Illustrated books about language models and AI agents, written with Jay Alammar.

Cover of An Illustrated Guide to AI Agents

A book I wrote with Jay Alammar for those interested in understanding how AI agents work, from LLMs all the way to autonomous systems.

With more than 300 custom-made illustrations, we build intuition for memory, tools, MCP, context engineering, and much more. Practical examples let you build as you read.

Buy now at Amazon
Explore the codeGitHub 433 stars
Cover of Hands-On Large Language Models

A book I wrote with Jay Alammar exploring the inner workings of large language models. We were fortunate enough to have it become one of O’Reilly’s best-selling books!

Learning about LLMs can be overwhelming. With almost 300 custom-made illustrations, we take an intuition-first approach through visual storytelling and practical examples. Whether you are a beginner or more advanced, we believe there is something for everyone.

Cover of Illustrated DeepSeek · 图解DeepSeek技术

A book I wrote with Jay Alammar about the inner workings of DeepSeek, particularly DeepSeek-R1. This collaboration with Turing Education allowed us to create a book specifically for a Chinese audience.

Through almost 120 full-color illustrations, we explore mixture of experts, reasoning models, and attention mechanisms: the pieces that made open-weight LLMs competitive with proprietary models.