OpenLLaMA is an open reproduction of Meta AI's LLaMA large language model, released under the permissive Apache 2.0 license. This repository provides the 7B and 3B models (trained on 1 trillion tokens) as well as a preview version of the 13B model (trained on 600 billion tokens). Model weights are provided in two formats: EasyLM format (for the EasyLM framework) and PyTorch format (for the Hugging Face transformers library). Both the training framework EasyLM and the checkpoint weights are licensed under Apache 2.0.
Key capabilities:
- Text generation: As an autoregressive language model, it can generate text based on input prompts.
- Open license: Both the weights and the training code are licensed under Apache 2.0, permitting commercial and research use.
- Multi-framework support: PyTorch and JAX weights are provided, loadable via Hugging Face transformers and EasyLM respectively.
Usage:
- Loading via Hugging Face Transformers: Preview checkpoints can be loaded directly from the Hugging Face Hub. Note that it is recommended to avoid using the fast tokenizer, because the automatically converted fast tokenizer can sometimes produce incorrect tokenization. This can be avoided by using the LlamaTokenizer class directly, or by setting use_fast=False in AutoTokenizer.
- Loading via EasyLM: Refer to EasyLM's LLaMA documentation. Unlike the original LLaMA, OpenLLaMA's tokenizer and weights are trained entirely from scratch, so there is no need to obtain the original LLaMA's tokenizer and weights. The BOS (beginning of sentence) token (id=1) was used during training, and it is best to prepend this token during few-shot evaluation for optimal performance.
- Evaluation: Evaluation can be performed using lm-eval-harness, but use_fast=False must be set to avoid tokenizer issues.
Applicable scenarios:
- Research use: As an open alternative to LLaMA, for academic research on large language models.
- Application development: Under the Apache 2.0 license, it can be integrated into commercial or open-source applications.
- Fine-tuning foundation: Pretrained weights are provided and can serve as a starting point for fine-tuning on downstream tasks.
Limitations:
- Model performance is comparable to the original LLaMA and GPT-J, but may differ slightly on some tasks.
- The tokenizer has known issues; the fast tokenizer should be avoided.
- The training data is the RedPajama dataset, which may contain benchmark data contamination (e.g., the CB and WSC tasks were removed).
- The 13B model is only a preview version and was trained on fewer tokens.
- No specific pricing, cost, or platform information is provided.