llama-cookbook  by meta-llama

Guide for building with Llama models

Created 2 years ago
17,872 stars

Top 2.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive guide and practical recipes for building applications with Meta's Llama family of large language models. It targets developers and researchers looking to implement inference, fine-tuning, and end-to-end use cases, offering community-driven approaches and the latest techniques for text and vision models.

How It Works

The cookbook offers a structured approach to leveraging Llama models, categorized into "Getting Started" recipes for inference, fine-tuning, and Retrieval-Augmented Generation (RAG), and "End-to-End Use Cases" demonstrating practical applications across various domains. It also includes integrations with third-party providers and showcases advanced techniques like handling long contexts and custom data analysis.

Quick Start & Requirements

  • Installation typically involves cloning the repository and following specific recipe instructions, often requiring Python environments.
  • Prerequisites vary by recipe but commonly include Python, PyTorch, and potentially specific libraries for data handling or model integration.
  • Access to Llama model weights is required, which may involve an application process.
  • Refer to individual recipe directories for detailed setup and dependencies.

Highlighted Details

  • Features recipes for the latest Llama 4 models, including long context handling and custom analysis.
  • Demonstrates integration with external services like WhatsApp.
  • Covers foundational tasks such as inference, fine-tuning, and RAG.
  • Includes a refactored llama-recipes library with fine-tuning FAQs.

Maintenance & Community

  • The project is actively maintained by Meta.
  • Contribution guidelines are available in CONTRIBUTING.md.
  • Links to official Llama models and Acceptable Use Policies are provided for various Llama versions.

Licensing & Compatibility

  • The repository itself is likely under a permissive license, but usage of Llama models is governed by Meta's specific Llama licenses and Acceptable Use Policies for each version (Llama 4, 3, 2).
  • Commercial use and closed-source linking are subject to the terms of the respective Llama model licenses.

Limitations & Caveats

  • The repository underwent a recent refactor, and older links or folders might be found in the archive-main branch.
  • Specific model weights are required and may have usage restrictions based on Meta's licensing.
Health Check
Last Commit

23 hours ago

Responsiveness

1 week

Pull Requests (30d)
12
Issues (30d)
1
Star History
139 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), and
20 more.

TinyLlama by jzhang38

0.1%
9k
Tiny pretraining project for a 1.1B Llama model
Created 2 years ago
Updated 1 year ago
Starred by Roy Frostig Roy Frostig(Coauthor of JAX; Research Scientist at Google DeepMind), Zhiqiang Xie Zhiqiang Xie(Coauthor of SGLang), and
40 more.

llama by meta-llama

0.1%
59k
Inference code for Llama 2 models (deprecated)
Created 2 years ago
Updated 7 months ago
Feedback? Help us improve.