meta-llama /llama

Inference code for Llama models

★ 59,621⑂ 9,764👁 535⑃ 222● 1,136▤ 0◈ 0
PythonNOASSERTIONCreated 2023-02-14
59,621
stars
+0
9,764
forks
535
watchers
222
prs
1,136
issues
0
releases
0
discussions

README

Note of deprecation

Thank you for developing with Llama models. As part of the Llama 3.1 release, we’ve consolidated GitHub repos and added some additional repos as we’ve expanded Llama’s functionality into being an e2e Llama Stack. Please use the following repos going forward:
- llama-models - Central repo for the foundation models including basic utilities, model cards, license and use policies
- PurpleLlama - Key component of Llama Stack focusing on safety risks and inference time mitigations 
- llama-toolchain - Model development (inference/fine-tuning/safety shields/synthetic data generation) interfaces and canonical implementations
- llama-agentic-system - E2E standalone Llama Stack system, along with opinionated underlying interface, that enables creation of agentic applications
- llama-cookbook - Community driven scripts and integrations

If you have any questions, please feel free to file an issue on any of the above repos and we will do our best to respond in a timely manner. 

Thank you!


 (Deprecated) Llama 2

We are unlocking the power of large language models. Llama 2 is now accessible to individuals, creators, researchers, and businesses of all sizes so that they can experiment, innovate, and scale their ideas responsibly. 

This release includes model weights and starting code for pre-trained and fine-tuned Llama language models — ranging from 7B to 70B parameters.

This repository is intended as a minimal example to load Llama 2 models and run inference. For more detailed examples leveraging Hugging Face, see llama-cookbook.

 Updates post-launch

See UPDATES.md. Also for a running list of frequently asked questions, see here.

 Download

In order to download the model weights and tokenizer, please visit the Meta website and accept our License.

Once your request is approved, you will receive a signed URL over email. Then run the download.sh script, passing the URL provided when prompted to start the download.

Pre-requisites: Make sure you have wget and md5sum installed. Then run the script: ./download.sh.

Keep in mind that the links expire after 24 hours and a certain amount of downloads. If you start seeing errors such as 403: Forbidden, you can always re-request a link.

 Access to Hugging Face

We are also providing downloads on Hugging Face. You can request access to the models by acknowledging the license and filling the form in the model card of a repo. After doing so, you should get access to all the Llama models of a version (Code Llama, Llama 2, or Llama Guard) within 1 hour.

 Quick Start

You can follow the steps below to quickly get up and running with Llama 2 models. These steps will let you run quick inference locally. For more examples, see the Llama 2 cookbook repository. 

1. In a conda env with PyTorch / CUDA available clone and download this repository.

2. In the top-level directory run:
    bash
    pip install -e .
    
3. Visit the Meta website and register to download the model/s.

4. Once registered,

Top issues

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON