Hands-On Large Language Models
The official code repository for the O'Reilly book Hands-On Large Language Models, with runnable notebooks for every chapter's examples.
Hands-On Large Language Models is the official code repository for the O'Reilly book of the same name, written by Jay Alammar and Maarten Grootendorst. It contains the notebooks for all of the book's examples, illustrated with close to 300 custom figures.
The twelve chapters cover an introduction to language models, tokens and embeddings, looking inside transformer LLMs, text classification, text clustering and topic modeling, prompt engineering, advanced text generation, semantic search and retrieval-augmented generation, multimodal LLMs, creating text embedding models, and fine-tuning representation and generation models.
The examples are designed to run on Google Colab's free GPU tier, though other cloud providers and a local conda-based setup also work.