Project Overview
Llama is an easily accessible, open large language model (LLM) designed for developers, researchers, and businesses to build, experiment, and responsibly scale their generative AI ideas. As part of the foundational system, it is a cornerstone for global social innovation. Several key aspects:
-
Open Access: Easy access to cutting-edge large language models, promoting collaboration and advancement among developers, researchers, and organizations.
-
Extensive Ecosystem: The Llama model has been downloaded hundreds of millions of times, with thousands of community projects built on Llama. The platform supports a wide range, from cloud providers to startups – the world is building with Llama!
-
Trust and Safety: The Llama model is part of a comprehensive approach to trust and safety, with released models and tools designed to facilitate community collaboration and encourage the development and use of trusted and safe generative AI tools.
Our mission is to empower individuals and industries through this opportunity while fostering an environment for discovering and ethically advancing artificial intelligence. Model weights are licensed to researchers and commercial entities, adhering to open principles.
Available Models
-
Llama 2 (July 18, 2023): 7B, 13B, 70B parameters
-
Llama 3 (April 18, 2024): 8B, 70B parameters
-
Llama 3.1 (July 23, 2024): 8B, 70B, 405B parameters
Download
To download model weights and tokenizers, please visit the Meta Llama website and accept our license.
Once your request is approved, you will receive a signed URL via email. Then, run the download.sh script and pass the provided URL when prompted to start the download.
Prerequisites: Ensure you have wget
and md5sum
installed. Then run the script: ./download.sh
. ./download.sh
can be found in the corresponding models
directory.
Please remember that the link will expire after 24 hours and a certain number of downloads. If you start seeing errors like 403: Forbidden
, you can always request the link again.
Access Hugging Face
We also provide downloads on Hugging Face, including Transformer and native llama3
formats. To download weights from Hugging Face, follow these steps:
-
Visit one of the repositories, such as meta-llama/Meta-Llama-3.1-8B-Instruct.
-
Read and accept the license. Once your request is approved, you will have access to all Llama 3.1 models and previous versions. Please note that past requests can take up to an hour to process.
-
To download the original native weights for use with this repository, click the “Files and Versions” tab and download the contents of the
original
folder. If youpip install huggingface-hub
, you can also download them from the command line:
<span>huggingface-cli download meta-llama/Meta-Llama-3.1-8B-Instruct --include <span>"original/*"</span> --<span>local</span>-dir meta-llama/Meta-Llama-3.1-8B-Instruct</span>
Note that the original native weights for meta-llama/Meta-Llama-3.1-405B are not available through this Hugging Face repository.
-
To use with transformers, the following pipeline snippet will download and cache the weights:
<span>import transformers</span>
<span>import torch</span>
<span>model_id = <span>"meta-llama/Meta-Llama-3.1-8B-Instruct"</span></span>
<span>pipeline = transformers.pipeline(</span>
<span> <span>"text-generation"</span>,</span>
<span> model=<span>"meta-llama/Meta-Llama-3.1-8B-Instruct"</span>,</span>
<span> model_kwargs={<span>"torch_dtype"</span>: torch.bfloat16},</span>
<span> device=<span>"cuda"</span>,</span>
<span>)</span>
Installation
Simply run pip install llama-models
to install this repository as a package.
Project Links
https://github.com/meta-llama/llama-models
This article is sourced from the internet, for reference links click the bottom left corner to read the original text. It is for academic sharing only, if there is any infringement, it will be deleted immediately.
Editor / Garvey
Reviewed by / Fan Ruiqiang
Checked by / Garvey
Click below
Follow us