📈 GH Trending Explorer 🎲 Surprise me

← all repos

HandsOnLLM / Hands-On-Large-Language-Models

git clone https://github.com/HandsOnLLM/Hands-On-Large-Language-Models.git 🔥 on GitHub Trending today

Official code repo for the O'Reilly Book - "Hands-On Large Language Models"

—
stars, 24h
+225
stars, 7 days · #277
—
stars, 30 days
30k
★ total · +1% this week
6.8k
forks · 24 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageJupyter Notebook
LicenseApache-2.0
Created2024-06-28 (2y ago)
Last push5mo ago
Watchers297
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-20 — #2 weekly in jupyter-notebook · +225 ★

GitHub topics

Links

README excerpt
# 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:
* Amazon
* Shroff Publishers (India)
* O'Reilly
* Kindle
* Barnes and Noble
* Goodreads
## 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. 
| Chapter | Notebook |
|---|---|
| Chapter 1: Introduction to Language Models | |
| Chapter 2: Tokens and Embeddings | |
| Chapter 3: Looking Inside Transformer LLMs | |
| Chapter 4: Text Classification | |
| Chapter 5: Text Clustering and Topic Modeling | |
| Chapter 6: Prompt Engineering | |
| Chapter 7: Advanced Text Generation Techniques and Tools | |
| Chapter 8: Semantic Search and Retrieval-Augmented Generation | |
| Chapter 9: Multimodal Large Language Models | |
| Chapter 10: Creating Text Embedding Models | |
| Chapter 11: Fine-tuning Representation Models for Classification | |
| Chapter 12: Fine-tuning Generation Models | |
> [!TIP]
> 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