> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/HandsOnLLM/Hands-On-Large-Language-Models/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to Hands-On Large Language Models

> Official documentation for the O'Reilly book featuring practical tutorials and visual guides for understanding and building with LLMs

<img className="block" src="https://raw.githubusercontent.com/HandsOnLLM/Hands-On-Large-Language-Models/main/images/book_cover.png" alt="Hands-On Large Language Models Book Cover" style={{ maxWidth: '400px', margin: '0 auto' }} />

## About This Book

Welcome to **Hands-On Large Language Models** by [Jay Alammar](https://www.linkedin.com/in/jalammar/) and [Maarten Grootendorst](https://www.linkedin.com/in/mgrootendorst/) — a comprehensive guide to understanding and building with Large Language Models through **nearly 300 custom-made figures** and hands-on code examples.

This documentation provides a companion to the book, making it easier to navigate chapters, run code examples, and explore advanced topics.

<Note>
  All examples are designed to run on Google Colab with a free T4 GPU (16GB VRAM). You can also run them on any cloud provider or local setup.
</Note>

## What You'll Learn

<CardGroup cols={2}>
  <Card title="LLM Fundamentals" icon="brain" href="/chapters/chapter-01-introduction">
    Understand how language models work, from tokens and embeddings to transformer architecture
  </Card>

  <Card title="Text Understanding" icon="magnifying-glass" href="/chapters/chapter-04-text-classification">
    Learn text classification, clustering, and topic modeling with modern LLMs
  </Card>

  <Card title="Text Generation" icon="wand-magic-sparkles" href="/chapters/chapter-06-prompt-engineering">
    Master prompt engineering and advanced generation techniques
  </Card>

  <Card title="Fine-Tuning" icon="screwdriver-wrench" href="/chapters/chapter-10-embedding-models">
    Create custom embedding models and fine-tune BERT and generation models
  </Card>
</CardGroup>

## Key Features

<Accordion title="Visual Learning Approach">
  Nearly 300 custom illustrations make complex LLM concepts accessible and easy to understand. Our visual teaching style has been praised by leaders in the field.
</Accordion>

<Accordion title="Hands-On Code Examples">
  Every chapter includes working Jupyter notebooks with real code using PyTorch, Transformers, and sentence-transformers. All examples are tested and ready to run.
</Accordion>

<Accordion title="Comprehensive Coverage">
  From basic tokens and embeddings to advanced topics like fine-tuning, RAG, multimodal models, and more. Plus bonus visual guides on cutting-edge topics.
</Accordion>

<Accordion title="Production-Ready Techniques">
  Learn practical techniques you can apply immediately, including semantic search, Retrieval-Augmented Generation, and model optimization.
</Accordion>

## Book Structure

The book is organized into 12 chapters covering the full spectrum of LLM development:

### Foundations

* **Chapter 1**: Introduction to Language Models
* **Chapter 2**: Tokens and Token Embeddings
* **Chapter 3**: Looking Inside Transformer LLMs

### Text Understanding & Generation

* **Chapter 4**: Text Classification
* **Chapter 5**: Text Clustering and Topic Modeling
* **Chapter 6**: Prompt Engineering
* **Chapter 7**: Advanced Text Generation Techniques

### Advanced Applications

* **Chapter 8**: Semantic Search and RAG
* **Chapter 9**: Multimodal Large Language Models

### Model Development

* **Chapter 10**: Creating Text Embedding Models
* **Chapter 11**: Fine-Tuning BERT for Classification
* **Chapter 12**: Fine-Tuning Generation Models

## Get Started

<CardGroup cols={2}>
  <Card title="Setup Your Environment" icon="rocket" href="/setup">
    Install dependencies and set up your development environment
  </Card>

  <Card title="Prerequisites" icon="book" href="/prerequisites">
    Review the required background knowledge and tools
  </Card>

  <Card title="Explore Chapters" icon="books" href="/chapters/chapter-01-introduction">
    Jump into the first chapter and start learning
  </Card>

  <Card title="Advanced Topics" icon="graduation-cap" href="/advanced/quantization">
    Explore bonus visual guides on cutting-edge topics
  </Card>
</CardGroup>

## Praise for the Book

<Note>
  "*Jay and Maarten have continued their tradition of providing beautifully illustrated and insightful descriptions of complex topics in their new book.*" — **Andrew Ng**, founder of DeepLearning.AI
</Note>

<Note>
  "*This is an exceptional guide to the world of language models and their practical applications in industry.*" — **Nils Reimers**, Director of ML at Cohere
</Note>

<Note>
  "*I can't think of another book that is more important to read right now.*" — **Josh Starmer**, StatQuest
</Note>

## Community & Resources

* **GitHub Repository**: [HandsOnLLM/Hands-On-Large-Language-Models](https://github.com/HandsOnLLM/Hands-On-Large-Language-Models)
* **Purchase the Book**: Available on [Amazon](https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961), [O'Reilly](https://www.oreilly.com/library/view/hands-on-large-language/9781098150952/), and other retailers
* **DeepLearning.AI Course**: [How Transformer LLMs Work](https://www.deeplearning.ai/short-courses/how-transformer-llms-work/)

<Tip>
  Check out the [Advanced Topics](/advanced/quantization) section for bonus visual guides on quantization, Mamba, Mixture of Experts, reasoning LLMs, and more!
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.