Library · book

Hands-On Large Language Models

Jay Alammar & Maarten Grootendorst
2024·O'Reilly Media

Source: https://www.oreilly.com/library/view/hands-on-large-language/9781098150952/

The applied companion to any from-scratch build.

Alammar and Grootendorst take the same pieces — tokens, embeddings, attention — and follow them all the way into the things products are made of: semantic search, RAG, classification, prompting, finetuning.

What sets it apart is the illustration: Alammar built his reputation making the transformer legible in pictures, and that gift runs through the whole book.

For anyone directing AI product, it is the quickest route to a team that shares correct intuitions about what these systems can and can't do — the vocabulary made visible.

Central argument

A practical, heavily illustrated guide to working with large language models: how tokens and embeddings work, how the transformer is put together, and then the applied layer that most products actually live in — semantic search and retrieval-augmented generation, text classification and clustering, prompt engineering, and finetuning. It favours clear mental models and runnable examples over exhaustive theory.

Critique

It is a book about using and applying LLMs, not about the frontier training stack: it says comparatively little about large-scale pretraining economics, RLHF/RLVR, or the systems engineering of serving at scale. Its strength — accessible, visual, application-first — is also its boundary; pair it with a from-scratch build (Raschka) and a foundations text (Xiao & Zhu) for the parts it deliberately skips.

Why it matters for product

For a CTO/CPO, this is the most efficient way to get a team's shared intuition right about the pieces you deploy: what an embedding is, why retrieval beats stuffing everything in the prompt, when to classify vs generate, where finetuning helps and where it doesn't. It maps almost one-to-one onto the product decisions you make with LLMs, and its pictures travel well in a room full of non-specialists.