@Gas1688: Can a book on large models really guide you through the whole process? I didn't believe it until I finished this one. T…

X AI KOLs Timeline News

Summary

The book 'Hands-On Large Language Models' offers a comprehensive, open-source guide to large language models with runnable code on Colab, covering topics from basics to multimodal applications.

Can a book on large models really guide you through the whole process? I didn't believe it until I finished this one. The book is titled *Hands-On Large Language Models* (Chinese: 《动手学大模型》), and all its content is fully open-source. The book spans 12 chapters, starting from the basics of language models and extending all the way to prompt engineering, semantic search, fine-tuning, and even multimodal applications. You can just drop each chapter's code into Colab and run it—no need to set up your own environment. Read, type, and verify as you go. 1⃣ 12 chapters in a progressive order, even zero foundation can keep up 2⃣ All code is fully runnable, no need to build your own environment 3⃣ Run online in Colab, just open your browser and get hands-on 4⃣ Real-world cases for prompt engineering and fine-tuning 5⃣ Covers multimodal applications too, not limited to pure text 6⃣ Official site and GitHub updated in sync, no outdated issues GitHub:
Original Article
View Cached Full Text

Cached at: 09/19/26, 09:10 PM

Can a book on large models really guide you through the whole process? I didn’t believe it until I finished this one. The book is titled Hands-On Large Language Models (Chinese: 《动手学大模型》), and all its content is fully open-source.

The book spans 12 chapters, starting from the basics of language models and extending all the way to prompt engineering, semantic search, fine-tuning, and even multimodal applications.

You can just drop each chapter’s code into Colab and run it—no need to set up your own environment. Read, type, and verify as you go.

1⃣ 12 chapters in a progressive order, even zero foundation can keep up
2⃣ All code is fully runnable, no need to build your own environment
3⃣ Run online in Colab, just open your browser and get hands-on
4⃣ Real-world cases for prompt engineering and fine-tuning
5⃣ Covers multimodal applications too, not limited to pure text
6⃣ Official site and GitHub updated in sync, no outdated issues
GitHub:


HandsOnLLM/Hands-On-Large-Language-Models

Source: https://github.com/HandsOnLLM/Hands-On-Large-Language-Models

Hands-On Large Language Models

Welcome! In this repository you will find the code for all examples throughout the book Hands-On Large Language Models written by Jay Alammar and Maarten Grootendorst which we playfully dubbed:

"The Illustrated LLM Book"

Through the visually educational nature of this book and with almost 300 custom made figures, learn the practical tools and concepts you need to use Large Language Models today!


The book is available on:

Table of Contents

We advise to run all examples through Google Colab for the easiest setup. Google Colab allows you to use a T4 GPU with 16GB of VRAM for free. All examples were mainly built and tested using Google Colab, so it should be the most stable platform. However, any other cloud provider should work.

ChapterNotebook
Chapter 1: Introduction to Language ModelsOpen In Colab
Chapter 2: Tokens and EmbeddingsOpen In Colab
Chapter 3: Looking Inside Transformer LLMsOpen In Colab
Chapter 4: Text ClassificationOpen In Colab
Chapter 5: Text Clustering and Topic ModelingOpen In Colab
Chapter 6: Prompt EngineeringOpen In Colab
Chapter 7: Advanced Text Generation Techniques and ToolsOpen In Colab
Chapter 8: Semantic Search and Retrieval-Augmented GenerationOpen In Colab
Chapter 9: Multimodal Large Language ModelsOpen In Colab
Chapter 10: Creating Text Embedding ModelsOpen In Colab
Chapter 11: Fine-tuning Representation Models for ClassificationOpen In Colab
Chapter 12: Fine-tuning Generation ModelsOpen In Colab

You can check the setup folder for a quick-start guide to install all packages locally and you can check the conda folder for a complete guide on how to setup your environment, including conda and PyTorch installation. Note that the depending on your OS, Python version, and dependencies your results might be slightly differ. However, they should this be similar to the examples in the book.

Reviews

Jay and Maarten have continued their tradition of providing beautifully illustrated and insightful descriptions of complex topics in their new book. Bolstered with working code, timelines, and references to key papers, their book is a valuable resource for anyone looking to understand the main techniques behind how Large Language Models are built.

Andrew Ng - founder of DeepLearning.AI


This is an exceptional guide to the world of language models and their practical applications in industry. Its highly-visual coverage of generative, representational, and retrieval applications of language models empowers readers to quickly understand, use, and refine LLMs. Highly recommended!

Nils Reimers - Director of Machine Learning at Cohere | creator of sentence-transformers


I can’t think of another book that is more important to read right now. On every single page, I learned something that is critical to success in this era of language models.

Josh Starmer - StatQuest


If you’re looking to get up to speed in everything regarding LLMs, look no further! In this wonderful book, Jay and Maarten will take you from zero to expert in the history and latest advances in large language models. With very intuitive explanations, great real-life examples, clear illustrations, and comprehensive code labs, this book lifts the curtain on the complexities of transformer models, tokenizers, semantic search, RAG, and many other cutting-edge technologies. A must read for anyone interested in the latest AI technology!

Luis Serrano, PhD - Founder and CEO of Serrano Academy


Hands-On Large Language Models brings clarity and practical examples to cut through the hype of AI. It provides a wealth of great diagrams and visual aids to supplement the clear explanations. The worked examples and code make concrete what other books leave abstract. The book starts with simple introductory beginnings, and steadily builds in scope. By the final chapters, you will be fine-tuning and building your own large language models with confidence.

Leland McInnes - Researcher at the Tutte Institute for Mathematics and Computing | creator of UMAP and HDBSCAN


Bonus content!

We attempted to put as much information into the book without it being overwhelming. However, even with a 400-page book there is still much to discover!

We continue to create more guides that compliment the book and go more in-depth into new and exciting topics:

A Visual Guide to MambaA Visual Guide to QuantizationThe Illustrated Stable Diffusion
A Visual Guide to Mixture of ExpertsA Visual Guide to Reasoning LLMsThe Illustrated DeepSeek-R1

Citation

Please consider citing the book if you consider it useful for your research:

@book{hands-on-llms-book,
  author       = {Jay Alammar and Maarten Grootendorst},
  title        = {Hands-On Large Language Models},
  publisher    = {O'Reilly},
  year         = {2024},
  isbn         = {978-1098150969},
  url          = {https://www.oreilly.com/library/view/hands-on-large-language/9781098150952/},
  github       = {https://github.com/HandsOnLLM/Hands-On-Large-Language-Models}
}

Similar Articles

@Jolyne_AI: An open-source hands-on book: "Hands-On Large Language Models". The book has 12 chapters, progressing from language model fundamentals to prompt engineering, semantic search, model fine-tuning, and multimodal applications, covering the key paths to deploying large models in practice. GitHub: h…

X AI KOLs Timeline

An open-source hands-on book "Hands-On Large Language Models", with 12 chapters covering language model fundamentals, prompt engineering, semantic search, model fine-tuning, and multimodal applications. It provides runnable code examples, ideal for practical learning.

@GitHub_Daily: Want to understand how Large Language Models actually work? Existing resources are either too academic and hard to digest, or too superficial, focusing only on concepts, with nothing that clearly explains the entire process from start to finish. Similarly, I came across the 'how-llms-work' project, which turns the complete workflow of LLMs into a visual interactive webpage, based on Andrej Karpathy’s...

X AI KOLs Timeline

An interactive visual guide, 'how-llms-work', breaks down the entire lifecycle of Large Language Models based on Andrej Karpathy's lectures, covering data collection to post-training.