AI Compare
​
​
ToolsArticlesServices
Best for
    All tools

    Sales

    AI tools for finding leads, qualifying them, preparing quotes, following up and keeping the CRM up to date.

    Marketing

    AI tools for content, social media, images, video, SEO and campaigns.

    Customer service

    AI tools for answering customer emails, chats and calls, handling requests and escalating the hard cases.

    Operations

    AI tools for running the daily work: workflows, scheduling, projects, purchasing and delivery.

    Finance

    AI tools for invoices, bookkeeping, reconciliation, spreadsheets and financial reporting.

    Management & Admin

    AI tools for owners, managers and office staff: planning, reports, documents, meetings, scheduling and everyday admin.

    HR

    AI tools for hiring, screening candidates, onboarding, training and answering employee questions.

    Legal & Compliance

    AI tools for reviewing contracts, tracking deadlines and preparing compliance work for a qualified person to check.

    IT & Development

    AI tools for developers and IT teams: coding, AI models, agents, infrastructure and integrations.

Find AI tools for your team
AllAssistantsWriting & DocsImagesVideoAudioAI AgentsAutomationCode
← Back to tools

•

2024-06-28

Hands-On-Large-Language-Models logo

Hands-On-Large-Language-Models

Not rated yet

27.8K GitHub stars

Type:

Tool

Platforms:

Github

Task:

Study and learnGenerate imagesBuild RAG systemsSearch knowledge basesEngineer prompts

Best for:

MarketingIT & Development
Visit websiteView on GitHub

Pricing


Pricing information has not been added yet.

Overview

Hands-On Large Language Models is the companion code repository for the book by Jay Alammar and Maarten Grootendorst. The book and repository take a strongly visual and practical approach to explaining modern language models, with hundreds of custom figures and executable examples that connect core concepts to working implementations.

The material progresses from tokens, embeddings, and transformer internals through text classification, clustering, topic modeling, prompt engineering, text generation, semantic search, retrieval-augmented generation, multimodal models, embedding-model creation, and fine-tuning. The examples are designed to be run easily in Google Colab, including access to GPU resources.

The repository is useful for learners who want more than a conceptual introduction to LLMs. It provides notebooks and code that can be modified while reading the book, making it suitable for self-study, courses, workshops, and practitioners who want a structured path from language-model fundamentals to applied techniques.

README

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.

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

[!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


"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}
}

Releases

Release information has not been added yet.

Complete your AI stack

Turn generated images into videos, articles, books, voiceovers, and automated content workflows.

Runway logo
Runway
Create videos

AI video generation and creative production platform

View tool
ChatGPT logo
ChatGPT
Write articles

General-purpose AI assistant for research, writing, coding, data analysis, image creation, and everyday productivity

View tool
AIWriteBook logo
AIWriteBook
Create books

End-to-end AI platform for writing and publishing books.

View tool
ElevenLabs logo
ElevenLabs
Add voice

AI voice, music, audio, video, and conversational agent platform

View tool
n8n logo
n8n
Automate publishing

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

View tool
Best alternatives

Compare similar tools in the same category.

CodeRabbit logo

CodeRabbit

AI-powered code review assistant for pull requests.

OpenClaw logo

OpenClaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

Cursor logo

Cursor

AI coding editor and autonomous software development platform

DeepSeek logo

DeepSeek

AI assistant for reasoning, coding, research, and agent tasks

ECC logo

ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

View all in this category
Help
Pick an answer below
Hi! I can point you to the right tool or guide. What are you looking for?
Browse all articles