Model reference · open weights
open_llama is an open-weight language model from openlm-research. open_llama_7b (BF16) weighs 13.5 GB; the smallest configuration that runs it is RTX 4060 Ti 16 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the openlm-research/open_llama_7b model card, 2026-10-01
What it is
| Released by | openlm-research |
|---|---|
| Released | 2023-06-07 |
| VRAM | 13.5 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 2K each | |||
| RTX 3060 12 GB | 11.6 GB | ||
| RTX 4060 Ti 16 GB | 1 | all 2K | 15.4 GB |
| RTX 3090 24 GB | 8 | all 2K | 23.4 GB |
| RTX 4090 24 GB | 8 | all 2K | 23.4 GB |
| RTX 5090 32 GB | 15 | all 2K | 31.0 GB |
| L40S 48 GB | 27 | all 2K | 44.0 GB |
| A100 80 GB | 59 | all 2K | 78.2 GB |
| H100 80 GB | 56 | all 2K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 71 | all 2K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 84 | all 2K | 107 GB |
| H200 141 GB | 112 | all 2K | 138 GB |
| B200 180 GB | 147 | all 2K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 7 | all 2K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 14 | all 2K | 15.4 GB a card |
| Requests at once | 2K tokens each |
|---|---|
| 1 | 15.2 GB |
| 5 | 19.5 GB |
| 8 | 22.7 GB |
| 16 | 31.3 GB |
| 32 | 48.5 GB |
| 64 | 82.8 GB |
One card, with vLLM's small-card settings.
From the model card
In this repo, we present a permissively licensed open source reproduction of Meta AI's LLaMA large language model. We are releasing a 7B and 3B model trained on 1T tokens, as well as the preview of a 13B model trained on 600B tokens. We provide PyTorch and JAX weights of pre-trained OpenLLaMA models, as well as evaluation results and comparison against the original LLaMA models. Please see the project homepage of OpenLLaMA for more details.
We release the weights in two formats: an EasyLM format to be use with our EasyLM framework, and a PyTorch format to be used with the Hugging Face transformers library. Both our training framework EasyLM and the checkpoint weights are licensed permissively under the Apache 2.0 license.
Preview checkpoints can be directly loaded from Hugging Face Hub. Please note that it is advised to avoid using the Hugging Face fast tokenizer for now, as we’ve observed that the auto-converted fast tokenizer sometimes gives incorrect tokenizations. This can be achieved by directly using the LlamaTokenizer class, or passing in the use_fast=False option for the AutoTokenizer class. See the following example for usage.
import torch
from transformers import LlamaTokenizer, LlamaForCausalLM
model_path = 'openlm-research/open_llama_3b'
# model_path = 'openlm-research/open_llama_7b'
tokenizer = LlamaTokenizer.from_pretrained(model_path)
model = LlamaForCausalLM.from_pretrained(
model_path, torch_dtype=torch.float16, device_map='auto',
)
prompt = 'Q: What is the largest animal?\nA:'
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
generation_output = model.generate(
input_ids=input_ids, max_new_tokens=32
)
print(tokenizer.decode(generation_output[0]))
For more advanced usage, please follow the transformers LLaMA documentation.
The model can be evaluated with lm-eval-harness. However, due to the aforementioned tokenizer issue, we need to avoid using the fast tokenizer to obtain the correct results. This can be achieved by passing in use_fast=False to this part of lm-eval-harness, as shown in the example below:
tokenizer = self.AUTO_TOKENIZER_CLASS.from_pretrained(
pretrained if tokenizer is None else tokenizer,
revision=revision + ("/" + subfolder if subfolder is not None else ""),
use_fast=False
)
For using the weights in our EasyLM framework, please refer to the LLaMA documentation of EasyLM. Note that unlike the original LLaMA model, our OpenLLaMA tokenizer and weights are trained completely from scratch so it is no longer needed to obtain the original LLaMA tokenizer and weights. Note that we use BOS (beginning of sentence) token (id=1) during training, so it is best to prepend this token for best performance during few-shot evaluation.
We train our models on the RedPajama dataset released by Together, which is a reproduction of the LLaMA training dataset containing over 1.2 trillion tokens. We follow the exactly same preprocessing steps and training hyperparameters as the original LLaMA paper, including model architecture, context length, training steps, learning rate schedule, and optimizer. The only difference between our setting and the original one is the dataset used: OpenLLaMA employs the RedPajama dataset rather than the one utilized by the original LLaMA.
We train the models on cloud TPU-v4s using EasyLM, a JAX based training pipeline we developed for training and fine-tuning large language models. We employ a combination of normal data parallelism and fully sharded data parallelism (also know as ZeRO stage 3) to balance the training throughput and memory usage. Overall we reach a throughput of over 2200 tokens / second / TPU-v4 chip for our 7B model.
We evaluated OpenLLaMA on a wide range of tasks using lm-evaluation-harness. The LLaMA results are generated by running the original LLaMA model on the same evaluation metrics. We note that our results for the LLaMA model differ slightly from the original LLaMA paper, which we believe is a result of different evaluation protocols. Similar differences have been reported in this issue of lm-evaluation-harness. Additionally, we present the results of GPT-J, a 6B parameter model trained on the Pile dataset by EleutherAI.
The original LLaMA model was trained for 1 trillion tokens and GPT-J was trained for 500 billion tokens. We present the results in the table below. OpenLLaMA exhibits comparable performance to the original LLaMA and GPT-J across a majority of tasks, and outperforms them in some tasks.
| Task/Metric | GPT-J 6B | LLaMA 7B | OpenLLaMA 7B | OpenLLaMA 3B | OpenLLaMA 13B 600BT |
|---|---|---|---|---|---|
| anli_r1/acc | 0.32 | 0.35 | 0.33 | 0.33 | 0.33 |
| anli_r2/acc | 0.34 | 0.34 | 0.36 |
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.