AIAny
Icon for item

Hands-On Large Language Models

Official code companion to the O'Reilly book by Jay Alammar and Maarten Grootendorst: 12 chapters of runnable notebooks on tokens, embeddings, Transformers, text classification, clustering, prompt engineering, semantic search, RAG, and fine-tuning.

Introduction

Most LLM books pick a side: heavy on math you skim, or a thin wrapper of API calls you could copy from any quickstart. This one threads the needle — every idea from word embeddings to RAG arrives with both an illustrated mental model and a notebook you actually run. That pairing is why it became one of the most-recommended on-ramps for engineers entering the field.

What Sets It Apart
  • Visual-first explanations from Jay Alammar, author of "The Illustrated Transformer" — the diagrams carry the load that prose usually fumbles.
  • 12 chapters of full runnable notebooks, not snippets: tokenization, embeddings, Transformer internals, text classification, clustering and topic modeling, prompt engineering, advanced generation, semantic search, RAG, multimodal models, and fine-tuning.
  • Built around open, locally-runnable models rather than one paid API, so the labs keep working regardless of a single vendor's pricing changes.
  • Co-authored by Maarten Grootendorst, creator of BERTopic, so the clustering and embedding chapters reflect real library design rather than toy examples.
Who It's For

Great fit if you can write Python and want a guided, build-as-you-read path from "I've heard of embeddings" to shipping a working semantic search or RAG system. Look elsewhere if you need research-depth derivations of attention math, coverage of the newest frontier-model techniques (the material reflects the 2024 landscape), or examples in a language other than Python.

Information

  • Websitegithub.com
  • OrganizationsO'Reilly Media
  • AuthorsJay Alammar, Maarten Grootendorst, O'Reilly Media
  • Published date2024/06/28

More Items

GitHub

Practical, full-stack tutorial for building Retrieval-Augmented Generation (RAG) systems—covers data preprocessing, vector embedding and indexing, hybrid and multimodal retrieval, generation integration, evaluation and production-ready engineering. Includes hands-on projects and examples for developers with Python experience.

GitHub

Open textbook for upper-level undergraduates that explains computational principles behind autonomous robots — mechanisms, sensors, actuators, perception, and planning — with exercises and simulation assets. Distributed as LaTeX source under a CC-BY-NC-ND license and accompanied by course materials and Webots examples.

GitHub

Provides 150+ executed Jupyter notebooks and code that reproduce the book 'Machine Learning for Algorithmic Trading (2nd ed.)' — covers feature engineering, alternative-data signal extraction, backtesting, NLP, deep learning and reinforcement learning for trading; best for quant researchers and practitioners.