{"data":{"slug":"handsonllm-hands-on-large-language-models","name":"Hands-On-Large-Language-Models","tagline":"Code for the 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":29162,"forks":6662,"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":910,"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":40,"watchers":295,"ai_summary":"Provides code examples and educational content related to large language models, as described in the O'Reilly book 'Hands-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-09-20T04:33:04.917356+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"},{"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"}],"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-09-18T08:44:56.542Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":146,"last_release_at":null,"stars_delta_30d":910,"open_issues_delta_30d":2},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":187,"high_count":0,"last_scan_at":"2026-09-18T08:44:58.218Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:44:55.446Z"},"languages":{"value":["jupyter notebook"],"source":"github.language","observed_at":"2026-09-18T08:44:55.446Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-09-18T08:44:55.446Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["Use this tool if you are looking for practical, code-based learning resources that align with the book 'Hands-On Large Language Models'.","Ideal for developers who prefer learning through visual aids and interactive code examples, as the book includes almost 300 custom-made figures.","Suitable for those who want to run examples on Google Colab, as the code is primarily built and tested on this platform, ensuring a stable setup."],"when_not_to_use":["Avoid this tool if you are seeking a comprehensive theoretical background without practical examples, as the focus is on hands-on learning.","Not recommended for users who prefer a different platform for running code examples, as the repository is optimized for Google Colab with a T4 GPU and 16GB VRAM.","If you are looking for a tool that covers a broader range of AI topics beyond large language models, this repository may not be the best fit."],"source":"enrich:decision_facts","observed_at":"2026-09-18T09:18:42.553Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Hands-On-Large-Language-Models offers code examples and educational content for large language models, as detailed in the O'Reilly book 'Hands-On Large Language Models'. The repository is in Jupyter Notebook format and,遵"}]}}