System Design Space
Knowledge graphSettings

Updated: February 21, 2026 at 11:59 PM

Hands-On Large Language Models (short summary)

mid

Source

Telegram: book_cube

Book review from Alexander Polomodov

Read post

Hands-On Large Language Models

Authors: Jay Alammar, Maarten Grootendorst
Publisher: O'Reilly Media, Inc.
Length: 428 pages

Jay Alammar and Maarten Grootendorst: visual guide to LLM with ~300 illustrations - tokenization, embeddings, transformers, RAG.

Hands-On Large Language Models - original coverOriginal

About the authors

The book was written by two ML/AI experts known for their visual explanations of complex concepts:

Jay Alammar

Engineering Fellow at Cohere, author of cult visual guides on ML and NLP. His diagrams are used in NumPy documentation, pandas, and deeplearning.ai courses.

jalammar.github.io

Maarten Grootendorst

Data Scientist, author of open-source libraries BERTopic and KeyBERT. Specialist in topic modeling and embedding.

newsletter.maartengrootendorst.com

Philosophy of the book

The authors follow the approach "intuition is primary": First develops a qualitative understanding of concepts through visualizations, and then reinforces it with formal description and code examples.

~300 original illustrations

Self-attention mechanisms, tokenizers, multidimensional embedding spaces - everything is explained through visual diagrams, graphs and drawings.

All code is available at GitHub.

Related chapter

AI Engineering (Chip Huyen)

An advanced look at production practices: RAG, agents, finetuning

Читать обзор

Book structure

The book consists of three parts and 12 chapters: from the basics of LLM to their use for solving problems, and ending with methods for training models.

IUnderstanding Language Patterns

The first part lays the foundation by explaining the structure of language models.

1

Introduction to Language Models

Evolution from "bag of words" through word embeddings to transformers architecture. How do LLMs differ from previous approaches?

2

Tokenization and embeddings

How the LLM tokenizer works. Comparison of token types: words, subwords, characters, bytes. Construction of embeddings from word2vec to modern approaches.

3

Inside the transformer

Forward-pass models: processing input tokens, calculating the attention matrix, selecting the next token. An intuitive explanation of Self-Attention. Optimizations: KV-cache.

IIUsing Pretrained Models

Practical ways to use ready-made LLMs and embeddings to solve applied problems.

Chapter 4

Text classification

Application of LLM for classification problems with minimal training

Chapter 5

Clustering and Topic Modeling

BERTopic - one of the authors' library for topic analysis

Chapter 6

Prompt engineering

Chain of Thought, ReAct, Tree of Thought and other techniques

Chapter 7

Advanced text generation

LangChain, agents, Memory, Tools - complex pipelines

Chapter 8

Semantic Search and RAG

Retrieval-Augmented Generation - expanding the model's knowledge

Chapter 9

Multimodal models

Text + images: CLIP, BLIP-2, Vision-Language

IIITraining and fine tuning

Creating your own models and adapting existing LLMs for specific tasks.

10

Creating embedding models

Training your own text embeddings for specific domains

11

Fine-tuning for classification

Additional training of representation models for classification tasks

12

Fine-tuning generative models

Fine-tune LLM to generate text in a specific style or domain

Who is this book for?

  • Beginners and advanced specialists in ML/NLP
  • Developers and analysts implementing LLM into projects
  • Anyone who wants to confidently navigate modern models: ChatGPT, Mistral, Claude

Where to find the book

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov