
TinyLlama
Language1,304 ops1.1B params
Open foundation language models, 7B to 65B, trained on public data only, traced here via MobileLLaMA and TinyLlama.
Language · 1,562 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
LLaMA is a collection of foundation language models ranging from 7B to 65B parameters. The bet behind it is that for a given compute budget the best performance comes not from the largest models but from smaller models trained on more data. The authors push that further by weighing the inference budget: a smaller model trained longer will ultimately be cheaper at inference. They found the performance of a 7B model continues to improve even after 1T tokens. Every model was trained using publicly available datasets exclusively, without proprietary or inaccessible data. LLaMA-13B outperforms GPT-3 (175B) on most benchmarks, and LLaMA-65B is competitive with Chinchilla-70B and PaLM-540B.
The network is a standard transformer with a few borrowed improvements. Pre-normalization: the input of each transformer sub-layer is normalized rather than the output, using RMSNorm. The ReLU non-linearity is replaced by the SwiGLU activation function from PaLM. Absolute positional embeddings are removed in favour of rotary positional embeddings (RoPE) at each layer of the network. The training data is roughly 1.4T tokens after tokenization. English CommonCrawl makes up 67% of the mixture, preprocessed with the CCNet pipeline. The 33B and 65B models saw 1.4T tokens and the smaller ones 1.0T, all at a batch size of 4M tokens. Development took an estimated 2048 A100-80GB GPUs for approximately 5 months.
MobileLLaMA-1.4B-Base, one of the members traced here, is a Transformer with 1.4B parameters that downscales LLaMA to facilitate off-the-shelf deployment. It keeps the sentence piece tokenizer from LLaMA2 with a vocabulary of 32000 but trains the embeddings from scratch. To keep the work reproducible, all MobileLLaMA models were trained on 1.3T tokens from the RedPajama v1 dataset only. It was built as the language model inside MobileVLM, a vision language model for mobile devices, which trained a set of language models at 1.4B and 2.7B parameters from scratch. Its card reports that MobileLLaMA 1.4B is on par with the most recent open-source models on two standard benchmarks.
Key idea. LLaMA trains foundation language models from 7B to 65B parameters on trillions of tokens using publicly available datasets exclusively. LLaMA-13B outperforms GPT-3 (175B) on most benchmarks.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{touvron2023llamaopenefficientfoundation,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Hugo Touvron and Thibaut Lavril and Gautier Izacard and Xavier Martinet and Marie-Anne Lachaux and Timothée Lacroix and Baptiste Rozière and Naman Goyal and Eric Hambro and Faisal Azhar and Aurelien Rodriguez and Armand Joulin and Edouard Grave and Guillaume Lample},
year={2023},
eprint={2302.13971},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2302.13971},
}