All models

helium

Open foundation language models, 7B to 65B, trained on public data only, traced here via MobileLLaMA and TinyLlama.

Language · 1,562 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (109 KB)

Open in a new tab

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.

At a glance

Family
llama
Parameters
2B
Operations
1,562
Framework
PyTorch
Recurrent
No
Published
2023
Cited by
23,799 (as of 16 November 2026)
Authors
Hugo Touvron, Thibaut Lavril, Gautier Izacard and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11906
Graph hash
9218268c4e675fec904e67fca280b6458f24f8c9290d1d166f4cb33d85fecccd
Skeleton hash
56c8f993fddb803489948a1b5cdcb2e95a3b2ea58604dc3109ca0293adefaf1b
Architecture hash
f794ae45289b761db32771b18cd3cdf9194425883b529b3ce1bfd6a025cad626
Diagram SHA-256
34827697f99b6d36d7369a4c1d931d1ae996b2a6a46762d6a65f3bc0c08687b0
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

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.

  • LLaMA
  • LLaMA: Open and Efficient Foundation Language Models
  • Meta AI
  • foundation language model
  • large language model
  • LLM
  • MobileLLaMA
  • MobileVLM
  • TinyLlama
  • Helium
  • LlamaForCausalLM
  • RoPE
  • RMSNorm
  • SwiGLU
  • RedPajama

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}