Pre-training
×Over 15 trillion tokens of publicly available data, on sequences of 8,192 tokens with a mask that keeps attention within a document; both sizes, 8B and 70B.
Next-token prediction
In words
At every position the model gives each token of the vocabulary a probability of coming next; the loss is the negative logarithm of the probability it gave the token that does come next, averaged over the sequence.
: the token at position ; : the probability the model, reading the tokens before it, gave that token; : the sequence length.
Next-token prediction as drawn for DeepSeek‑V3.2‑Exp →That plate also draws multi-token prediction, fill-in-the-middle and DeepSeek-V3’s sequence-wise balance loss.
- Tokens
- over 15T
- Context
- 8,192, attention within a document
- Compute
- 1.3M and 6.4M GPU hours
- Data cutoff
- March 2023 for 8B, December 2023 for 70B
Not disclosed Learning rate · Batch · Steps · Optimizer
Why
The Chinchilla-optimal training compute for an 8B model corresponds to about 200B tokens, yet both models kept improving log-linearly up to 15T tokens. Smaller models trained longer are preferred, being much more efficient at inference. Meta’s post on Llama 3
Architecture at this stageThe model as drawn, at 8B and 70B: a context of 8,192, unscaled RoPE.
All settings8
- Tokens
- Over 15T (“15T+”), the same count given for both sizes
- Context
- Sequences of 8,192 tokens, with a mask so that self-attention does not cross document boundaries
- Data
- Publicly available sources, no Meta user data; seven times Llama 2’s dataset with four times more code; over 5% high-quality non-English data in over 30 languages; filtered by heuristics, NSFW filters, semantic deduplication and quality classifiers trained on data Llama 2 generated
- Data cutoff
- March 2023 for 8B, December 2023 for 70B
- Compute
- 1.3M GPU hours for 8B, 6.4M for 70B, on H100-80GB
- Hardware
- Training runs on two custom-built clusters of 24K GPUs; for the largest Llama 3 models, over 400 TFLOPS per GPU on 16K GPUs at once; effective training time over 95%
- Objective
- Next-token prediction
- Trainable
- All
Sources7
- Llama 3 model card, lines 28–62Tokens
- Meta’s Llama 3 postTokens, Context, Data, Hardware
- Llama 3 model card, line 13Context, Objective, Trainable
- Llama 3 model card, line 139Data
- Llama 3 model card, line 141Data cutoff
- Llama 3 model card, line 86Compute
- Llama 3 model card, lines 103–113Compute