meta-llama/llama-cookbook
Welcome to the Llama Cookbook! This is your go to guide for Building with Llama: Getting started with Inference, Fine-Tuning, RAG. We also show you how to solve end to end problems using Llama model family and using them on various provider services
Llama Cookbook — What It Is
Llama Cookbook is Meta's official collection of guides, code examples, and ready-to-use recipes for building applications with the Llama family of AI models (Meta's large language models). Think of it as a starter kit: instead of figuring out everything from scratch, you get working examples you can copy, adapt, and learn from.
What It Covers
The repository focuses on three main areas:
- Inference — how to run Llama models to generate text or analyze images
- Fine-tuning — how to customize a pre-trained Llama model on your own data
- End-to-end use cases — complete, practical applications built with Llama
It includes both text models and vision models (models that can process images as well as text).
Recent Recipes (Llama 4)
The README highlights five recent examples:
- Getting started with the Llama API — a notebook that walks you through your first API calls
- WhatsApp bot — integrate a Llama-powered assistant into WhatsApp
- 5M long context with Llama 4 Scout — working with extremely long documents (up to 5 million tokens of context)
- Research paper analyzer — use Llama 4 Maverick to read and summarize academic papers
- Book character mindmap — extract characters from a book and visualize their relationships
Repository Structure
The project is organized into four main folders:
| Folder | Purpose |
|---|---|
3p-integrations |
Recipes and use cases from third-party providers that support Llama |
end-to-end-use-cases |
Complete applications across different domains (chatbots, analysis tools, etc.) |
getting-started |
Introductory examples for inference, fine-tuning, and RAG (Retrieval-Augmented Generation — a technique for giving models access to external information) |
src |
The original code library (formerly called llama-recipes) plus frequently asked questions about fine-tuning |
Important Background
- Name change: This project was previously called llama-recipes and was recently renamed to llama-cookbook. If you see old references to "llama-recipes," they mean this same project.
- Recent refactor: The repository was recently reorganized. If you encounter broken links or missing folders, the README points to an
archive-mainbranch — a snapshot of the project from before the reorganization. - Fine-tuning questions: A dedicated FAQ for fine-tuning lives in
src/docs/. - Model details: For information about the latest Llama models themselves, the README directs you to the official Llama website.
Licensing
The README links to separate license files and acceptable-use policies for each Llama model version (Llama 2, 3, 3.1, 3.2, 3.3, and 4). This means the license terms depend on which model version you use — you'd need to check the specific license for the model you choose.
In One Sentence
Llama Cookbook is Meta's official, community-oriented collection of working examples and guides that show developers how to run, customize, and build real applications with Llama AI models.
Related
- Project
- Project
- Project
- Project