OpenLLaMA is an open-source large language model reproduction project developed by Xinyang Geng and Hao Liu of Berkeley AI Research, aiming to provide an open-source alternative to Meta AI's LLaMA under a permissive license. The project releases model weights and the training framework EasyLM under the Apache 2.0 license.
Purpose: OpenLLaMA provides a series of pretrained language models with 3B, 7B, and 13B parameter scales, which can serve as drop-in replacements for the original LLaMA models in existing implementations, for research, evaluation, and downstream application development.
Main capabilities: The project has released multiple versions of models, including the v1 series (3B, 7B, 13B) and the v2 series (3Bv2, 7Bv2), as well as the 3Bv3 model. The v1 models were trained on the RedPajama dataset; the v2 models were trained on a mixture of the Falcon refined-web dataset, the StarCoder dataset, and the wikipedia, arxiv, books, and stackexchange portions of RedPajama. Model training follows the preprocessing steps and hyperparameters of the original LLaMA paper, including model architecture, context length, training steps, learning rate schedule, and optimizer, with the only difference being the use of public datasets. The project provides weights in both PyTorch and JAX formats, as well as evaluation results and comparisons with the original LLaMA and GPT-J.
Usage: PyTorch-format weights can be loaded directly from the Hugging Face Hub and used with the Hugging Face transformers library. The project recommends avoiding the Hugging Face fast tokenizer, because the automatically converted fast tokenizer sometimes produces incorrect tokenization results; this can be avoided by directly using the LlamaTokenizer class or by passing the use_fast=False option to AutoTokenizer. JAX-format weights need to be used with the EasyLM framework; 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. Models can be evaluated using lm-eval-harness, which likewise requires passing use_fast=False to obtain correct results.
Applicable scenarios: Suitable for scenarios requiring an open-source, permissively licensed large language model for research and application development, and can be used as a replacement for LLaMA in existing implementations.
Limitations: The current version's tokenizer merges multiple consecutive spaces into one before tokenization (similar to the T5 tokenizer), so it is not suitable for code generation tasks (such as HumanEval); for code-related tasks, the v2 models should be used. The CB and WSC tasks were removed from evaluation because the model performed abnormally well on these two tasks, and benchmark data contamination in the training set is suspected.