Meta Llama 3 is a series of large language models launched by Meta, designed to enable individuals, creators, researchers, and businesses of all sizes to responsibly experiment, innovate, and scale their ideas. This GitHub repository (meta-llama/llama3) is the official site for Llama 3, but it has been marked as deprecated.
Purpose: The repository provides minimal examples for loading Llama 3 models and running inference, including weights and starter code for pretrained and instruction-tuned models, with model sizes ranging from 8B to 70B parameters.
Key capabilities: Supports fast inference; the pretrained models are suitable for text continuation, while the instruction-tuned models are trained for dialogue applications and must follow a specific ChatFormat format (starting with <|begin_of_text|>, each message containing <|start_header_id|>, role, <|end_header_id|>, a double newline, and content, ending with <|eot_id|>). All models support a maximum sequence length of 8192 tokens, but max_seq_len and max_batch_size must be set according to the hardware. Different models require different model parallel (MP) values.
Usage: Install PyTorch/CUDA in a conda environment, clone the repository, and run pip install -e .; visit the Meta Llama website to register and accept the license, receive a signed download link by email, and use the download.sh script to download the weights (wget and md5sum must be installed; links expire after 24 hours and have download count limits). Weights in transformers or native llama3 format can also be downloaded from Hugging Face, and Llama 3 models are accessible after accepting the license. When using transformers, the model can be loaded via pipeline. To run the examples, replace the checkpoint path and tokenizer path, and set nproc_per_node to the corresponding MP value.
Use cases: Suitable for researchers to conduct local inference experiments, prototype dialogue applications, and explore model fine-tuning.
Limitations: This repository is deprecated, and the official recommendation is llama-models (the base model hub repository), PurpleLlama (safety risks and inference-time mitigations), llama-toolchain (model development interfaces and implementations), llama-agentic (end-to-end agentic systems), and llama-cookbook (community scripts and integrations). Use of the models must comply with the license and acceptable use policy, and deploying classifiers to filter unsafe inputs and outputs is recommended. Testing does not cover all scenarios, and use carries potential risks.