{"data":{"slug":"handsonllm-hands-on-large-language-models","name":"Hands-On-Large-Language-Models","tagline":"Official code repo for the O'Reilly Book - 'Hands-On Large Language Models'","github_url":"https://github.com/HandsOnLLM/Hands-On-Large-Language-Models","owner":"HandsOnLLM","repo":"Hands-On-Large-Language-Models","owner_avatar_url":"https://avatars.githubusercontent.com/u/174106807?v=4","primary_language":"Jupyter Notebook","stars":28252,"forks":6531,"topics":["artificial-intelligence","book","large-language-models","llm","llms","oreilly","oreilly-books"],"archived":false,"github_pushed_at":"2026-04-24T10:20:08+00:00","maintenance_label":"Slowing","stars_delta_30d":642,"url":"https://www.graphcanon.com/tools/handsonllm-hands-on-large-language-models","markdown_url":"https://www.graphcanon.com/tools/handsonllm-hands-on-large-language-models.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/handsonllm-hands-on-large-language-models","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=handsonllm-hands-on-large-language-models","description":"Official code repo for the O'Reilly Book - \"Hands-On Large Language Models\"","homepage_url":"https://www.llm-book.com/","license":"Apache-2.0","open_issues":38,"watchers":284,"ai_summary":"A resource containing materials and examples associated with a book on large language models.","readme_excerpt":"# Hands-On Large Language Models\n\n<a href=\"https://www.linkedin.com/in/jalammar/\"><img src=\"https://img.shields.io/badge/Follow%20Jay-blue.svg?logo=linkedin\"></a>\n<a href=\"https://www.linkedin.com/in/mgrootendorst/\"><img src=\"https://img.shields.io/badge/Follow%20Maarten-blue.svg?logo=linkedin\"></a>\n<a href=\"https://www.deeplearning.ai/short-courses/how-transformer-llms-work/?utm_campaign=handsonllm-launch&utm_medium=partner\"><img src=\"https://img.shields.io/badge/DeepLearning.AI%20Course-NEW!-&labelColor=black&color=red.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAuMDAwMzY1MjgxIC0wLjAwMDE0MDE0MiAzMy4yOSAzMy4xNSI+Cgk8cGF0aCBkPSJNMTYuNjQzIDMzLjE0NWMtMy4yOTIgMC02LjUxLS45NzItOS4yNDYtMi43OTNhMTYuNTg4IDE2LjU4OCAwIDAxLTYuMTMtNy40MzhBMTYuNTA3IDE2LjUwNyAwIDAxLjMyIDEzLjM0YTE2LjU1IDE2LjU1IDAgMDE0LjU1NS04LjQ4NUExNi42NjUgMTYuNjY1IDAgMDExMy4zOTYuMzE4YTE2LjcxIDE2LjcxIDAgMDE5LjYxNi45NDQgMTYuNjI4IDE2LjYyOCAwIDAxNy40NyA2LjEwMyAxNi41MjIgMTYuNTIyIDAgMDEyLjgwNCA5LjIwN2MwIDQuMzk2LTEuNzUzIDguNjEtNC44NzQgMTEuNzE5YTE2LjY4IDE2LjY4IDAgMDEtMTEuNzY5IDQuODU0em0uMTI1LTYuNjI4YzYuOTA2IDAgMTIuNTE3LTUuNjk4IDEyLjUxNy0xMi43MyAwLTcuMDMtNS42MS0xMi43MjUtMTIuNTE3LTEyLjcyNS02LjkwNiAwLTEyLjUxNyA1LjY5OC0xMi41MTcgMTIuNzI1IDAgNy4wMjcgNS42MTEgMTIuNzMgMTIuNTE3IDEyLjczem0tLjEyNS0yLjkxOGMtNi4yODkgMC0xMS4zODYtNC45MjUtMTEuMzg2LTExLjAwMkM1LjI1NyA2LjUyIDEwLjM2IDEuNTkgMTYuNjQzIDEuNTljNi4yODQgMCAxMS4zODYgNC45MyAxMS4zODYgMTEuMDA3cy01LjA5NyAxMS4wMDItMTEuMzg2IDExLjAwMnptLS4yNDItNC41MDhjNC43NyAwIDguNjMzLTMuNjc5IDguNjMzLTguMjE4IDAtNC41MzgtMy44ODUtOC4yMjEtOC42MzMtOC4yMjEtNC43NDcgMC04LjYzMiAzLjY3OS04LjYzMiA4LjIyMSAwIDQuNTQzIDMuODg1IDguMjE4IDguNjMyIDguMjE4eiIgZmlsbD0iI0ZENEE2MSIvPgo8L3N2Zz4=\"></a>\n\nWelcome! In this repository you will find the code for all examples throughout the book [Hands-On Large Language Models](https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961) written by [Jay Alammar](https://www.linkedin.com/in/jalammar/) and [Maarten Grootendorst](https://www.linkedin.com/in/mgrootendorst/) which we playfully dubbed: <br> \n\n<p align=\"center\"><b><i>\"The Illustrated LLM Book\"</i></b></p>\n\nThrough 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!\n\n<a href=\"https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961\"><img src=\"images/book_cover.png\" width=\"50%\" ></a>\n\n<br>\n\nThe book is available on:\n\n* [Amazon](https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961)\n* [Shroff Publishers (India)](https://www.shroffpublishers.com/books/computer-science/large-language-models/9789355425522/)\n* [O'Reilly](https://www.oreilly.com/library/view/hands-on-large-language/9781098150952/)\n* [Kindle](https://www.amazon.com/Hands-Large-Language-Models-Alammar-ebook/dp/B0DGZ46G88/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr=)\n* [Barnes and Noble](https://www.barnesandnoble.com/w/hands-on-large-language-models-jay-alammar/1145185960)\n* [Goodreads](https://www.goodreads.com/book/show/210408850-hands-on-large-language-models)\n\n## Table of Contents\n\nWe 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. \n\n| Chapter  | Notebook  |\n|---|---|\n| Chapter 1: Introduction to Language Models  |    |\n| Chapter 2: Tokens and Embeddings  |   |\n| Chapter 3: Looking Inside Transformer LLMs  |   |\n| Chapter 4: Text Classification  |   |\n| Chapter 5: Text Clustering and Topic Modeling  |   |\n| Chapter 6: Prompt Engineering  |   |\n| Chapter 7: Advanced Text Generation Techniques and Tools  |   |\n| Chapter 8: Semantic Search and Retrieval-Augmented Generation  |   |\n| Chapter 9: Multimodal Large Language Models  |   |\n| Chapter 10: Creat","github_created_at":"2024-06-28T11:49:46+00:00","created_at":"2026-07-07T17:32:27.927248+00:00","updated_at":"2026-08-16T18:01:51.252101+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"artificial-intelligence","name":"artificial-intelligence"},{"slug":"book","name":"book"},{"slug":"large-language-models","name":"large language models"},{"slug":"llm","name":"llm"},{"slug":"llms","name":"llms"},{"slug":"oreilly","name":"oreilly"},{"slug":"oreilly-books","name":"oreilly-books"}],"trust":{"provenance":{"is_fork":false,"github_id":821372392,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-16T18:01:50.537Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":114,"last_release_at":null,"stars_delta_30d":642,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:58:58.748Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-16T18:01:50.996Z"},"languages":{"value":["jupyter notebook"],"source":"github.language","observed_at":"2026-08-16T18:01:50.996Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-08-16T18:01:50.996Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"The repository is free and open under the Apache-2.0 license."},"requirements":{"notes":["- Access to Jupyter Notebook is required for running code examples provided in this repository.","- Fundamental understanding of large language models and familiarity with AI concepts would be beneficial."],"min_ram_gb":null,"requires_docker":null},"constraints":{"min_ram_gb":null,"pricing_model":"freemium","requires_docker":null},"when_to_use":["- You are focusing on practical implementation aspects detailed in a structured format as outlined by O'Reilly's authoritative book.","- Your team requires access to Jupyter Notebook-based examples that follow the guidelines set forth in the 'Hands-On Large Language Models' text."],"when_not_to_use":["- If you need real-time model evaluation tools rather than educational materials, as this repository primarily provides code for understanding and implementing concepts covered in a book.","- You are seeking proprietary or more specialized frameworks that go beyond the examples provided in an educational context to meet specific, advanced use-case needs."],"source":"enrich:decision_facts","observed_at":"2026-07-11T13:24:50.793Z"},"constraint_facets":{"min_ram_gb":null,"pricing_model":"freemium","requires_docker":null},"decision_summary":[{"label":"Pricing","value":"freemium - The repository is free and open under the Apache-2.0 license."},{"label":"Requirements","value":"- Access to Jupyter Notebook is required for running code examples provided in this repository.; - Fundamental understanding of large language models and familiarity with AI concepts would be beneficial."},{"label":"Adopt for","value":"Consider using the 'Hands-On-Large-Language-Models' repository if your interest aligns with hands-on learning and practice of large language models through coding examples."},{"label":"License detail","value":"Apache-2.0 License"}]}}