# meta-llama/llama-cookbook

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/meta-llama-llama-cookbook).**

18,357 stars · 2,740 forks · Jupyter Notebook · MIT

## Links

- GitHub: https://github.com/meta-llama/llama-cookbook
- Homepage: https://www.llama.com
- awesome-repositories: https://awesome-repositories.com/repository/meta-llama-llama-cookbook.md

## Topics

`ai` `finetuning` `langchain` `llama` `llama2` `llm` `machine-learning` `python` `pytorch` `vllm`

## Description

This project is a collection of implementation guides, recipes, and developer resources for building applications with Llama models. It serves as a comprehensive kit for developing autonomous agents, establishing retrieval-augmented generation systems, and executing model fine-tuning.

The resource provides specific patterns for multimodal workflows that process text, images, and audio. It includes specialized guidance on adapting pre-trained model weights for targeted tasks and implementing tool-calling orchestration to connect models with external APIs and functions.

The codebase covers a broad range of technical capabilities, including long-context document analysis, distributed GPU training, and quantization-based inference. It also details deployment strategies across cloud and on-premises environments, as well as methods for model checkpoint conversion and performance benchmarking.

The implementation examples are provided primarily through Jupyter Notebooks.

## Tags

### Artificial Intelligence & ML

- [Agentic LLM Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-llm-frameworks.md) — Provides a development kit for building autonomous agents with tool-calling and API orchestration.
- [Visual Reasoning](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/orchestration-engines/ai-agent/reasoning-action-loops/visual-reasoning.md) — Enables analyzing uploaded images to provide descriptive text and answer queries based on visual content. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/end-to-end-use-cases/whatsapp_llama_4_bot/README.md))
- [AI Agent Development](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-development.md) — Provides comprehensive guides for building autonomous agents using Llama models and orchestration frameworks. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/3p-integrations))
- [External Tool Integration](https://awesome-repositories.com/f/artificial-intelligence-ml/external-tool-integration.md) — Implements mechanisms for AI agents to interact with external APIs and tools to extend their operational capabilities. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/getting-started/))
- [Fine-Tuning Tutorials](https://awesome-repositories.com/f/artificial-intelligence-ml/fine-tuning-tutorials.md) — Offers guides and code examples for adapting pre-trained model weights using specialized datasets.
- [Retrieval Augmented Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-orchestration/retrieval-augmented-generation.md) — Connects models to external data sources using indexing frameworks for contextual retrieval. ([source](https://github.com/meta-llama/llama-cookbook#readme))
- [Long Context Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/long-context-processing.md) — Implements capabilities for analyzing extremely large input sequences using expanded context windows. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/README.md))
- [Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning.md) — Llama adapts pre-trained models on specific datasets and GPU setups to improve performance for specialized tasks. ([source](https://github.com/meta-llama/llama-cookbook#readme))
- [Multimodal AI Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-ai-orchestrators.md) — Implements workflows that coordinate text, image, and audio models for unified multimodal processing.
- [Parameter Efficient Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/parameter-efficient-fine-tuning.md) — Detailed recipes for adapting pre-trained weights using parameter-efficient techniques to optimize niche task performance.
- [RAG Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/rag-frameworks.md) — Provides a framework for building retrieval-augmented generation systems connected to private datasets.
- [Tool Calling](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-calling.md) — Implements tool-calling mechanisms that allow models to request and execute external functions for data retrieval. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))
- [Tool Calling Integration Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-calling-integration-frameworks.md) — Provides frameworks for training and implementing model interfaces that trigger external functions via structured outputs. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/getting-started))
- [Agentic RAG Development](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-rag-development.md) — Implements retrieval-augmented generation to answer questions based on specific private datasets. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))
- [Document Analysis Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-content-analysis/document-analysis-engines.md) — Provides patterns for extracting structured insights and visual representations from unstructured text documents. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/README.md))
- [Distributed Training](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-training.md) — Provides technical guidance on scaling model training across multiple GPUs using data parallelism.
- [Distributed Training Optimizers](https://awesome-repositories.com/f/artificial-intelligence-ml/distributed-training-optimizers.md) — Llama reduces memory and compute overhead across multiple GPUs using data parallelism and activation checkpointing. ([source](https://github.com/meta-llama/llama-cookbook/tree/archive-main))
- [Document Analysis](https://awesome-repositories.com/f/artificial-intelligence-ml/document-analysis.md) — Provides patterns for extracting information and mapping relationships within research papers and books. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))
- [Multimodal Inference Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/end-to-end-inference-pipelines/multimodal-inference-pipelines.md) — Implements workflows that sequence different models to process text, image, and audio inputs for end-to-end applications.
- [Document Question Answering Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/document-data-intelligence/question-answering/document-question-answering-pipelines.md) — Provides interfaces for performing question answering over textual document content. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/end-to-end-use-cases/book-character-mindmap/README.md))
- [High-Throughput Model Serving](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/inference-servers-and-runtimes/high-throughput-model-serving.md) — Llama increases prediction speed and memory efficiency using specialized serving servers and quantized data formats. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/3p-integrations))
- [Model Inference APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/inference-servers-and-runtimes/model-inference-apis.md) — Executes requests against model endpoints to generate text responses via hosted interfaces. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/getting-started/build_with_llama_api.ipynb))
- [Model Performance Benchmarking](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-evaluation-analysis/model-analysis/model-performance-benchmarking.md) — Llama runs throughput analysis and quality benchmarks to measure the efficiency of quantized models. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))
- [Model Inference Servers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-inference-serving/engines-runtimes-servers/model-inference-servers.md) — Sets up open-source model servers for executing models in server or mobile environments. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/getting-started))
- [Local Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-inference-serving/local-ai-deployment-platforms/deployment-platforms/local-inference.md) — Executes models on local hardware using memory-efficient techniques to generate responses. ([source](https://github.com/meta-llama/llama-cookbook#readme))
- [Experiment Tracking](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/training-monitoring-and-profiling/training-observability-systems/experiment-tracking.md) — Llama records training metrics and hyperparameters using monitoring tools to evaluate performance over time. ([source](https://github.com/meta-llama/llama-cookbook/tree/archive-main))
- [Training Performance Profiling](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/training-monitoring-and-profiling/training-performance-profiling.md) — Llama measures floating-point operations and captures execution traces to benchmark efficiency during the training process. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/getting-started/finetuning))
- [Model Output Safeguarding](https://awesome-repositories.com/f/artificial-intelligence-ml/model-output-safeguarding.md) — Llama applies safety scripts and policies to ensure generated content meets alignment guidelines. ([source](https://github.com/meta-llama/llama-cookbook/tree/archive-main))
- [Quantized Inference Runtimes](https://awesome-repositories.com/f/artificial-intelligence-ml/quantized-inference-runtimes.md) — Implements quantization-based inference to accelerate prediction speed and reduce memory usage on various hardware.
- [Automated Research Paper Analysis](https://awesome-repositories.com/f/artificial-intelligence-ml/research-papers/automated-research-paper-analysis.md) — Enables ingestion of full research papers into a single prompt to answer questions without external retrieval. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/end-to-end-use-cases/research_paper_analyzer/README.md))
- [Audio-to-Audio Conversational Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/text-to-audio-synthesis/audio-to-audio-conversational-loops.md) — Implements workflows that convert voice messages to text for processing and transform responses back into audio files. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/end-to-end-use-cases/whatsapp_llama_4_bot/README.md))

### Part of an Awesome List

- [Model Implementations](https://awesome-repositories.com/f/awesome-lists/ai/model-implementations.md) — Provides implementations for deploying, fine-tuning, and building applications with Llama models. ([source](https://github.com/meta-llama/llama-cookbook/blob/main/requirements.txt))

### Development Tools & Productivity

- [Tool-Call Orchestrators](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-triggers/tool-call-orchestrators.md) — Provides orchestrators that use model-generated parameters to trigger multi-step external function workflows.

### Education & Learning Resources

- [LLM Engineering Guides](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/machine-learning-education/llm-engineering-guides.md) — Provides a comprehensive collection of recipes and implementation strategies for Llama model engineering.

### Data & Databases

- [AI Data Analysis Tools](https://awesome-repositories.com/f/data-databases/ai-data-analysis-tools.md) — Provides capabilities for executing code and processing files to generate interactive charts and data insights. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/3p-integrations))
- [Document-to-Audio Synthesis](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/batch-processing-systems/batch-processing-utilities/audio-batch-utilities/text-to-audio-batch-conversion/document-to-audio-synthesis.md) — Transforms PDF content into multi-speaker scripts and audio files using a sequence of specialized models. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))
- [Natural Language to SQL](https://awesome-repositories.com/f/data-databases/data-visualization-charts/natural-language-querying/natural-language-to-sql.md) — Connects models to SQL databases to answer natural language questions about relational data. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/end-to-end-use-cases))

### DevOps & Infrastructure

- [Cloud Deployment](https://awesome-repositories.com/f/devops-infrastructure/cloud-deployment.md) — Configures model inference and workflows on cloud providers using serverless APIs and GPU clusters. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/3p-integrations))
- [On-Premise Deployment](https://awesome-repositories.com/f/devops-infrastructure/on-premise-deployment.md) — Manages model instances within local infrastructure instead of public cloud platforms. ([source](https://github.com/meta-llama/llama-cookbook/tree/main/3p-integrations))
