File size: 8,284 Bytes
643267a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Reproducibility

This supplement covers the main PAT and FA language-model training and inference implementations. The paper's main PAT configuration uses grouped memory transitions and calibrated query/key scale initialization. Earlier context experiments used a different transition-sharing and scale-initialization recipe; the fixed implementation in this supplement should not be described as reproducing that separate recipe.

## Paper training recipe

| Setting | Value |
|---|---|
| Initialization seed | 42 |
| Compute precision | bfloat16 |
| Optimizer | AdamW |
| Adam beta values | 0.9, 0.999 |
| Adam epsilon | 1e-8 |
| Weight decay | 0.01 |
| Global gradient norm clipping | 1.0 |
| Peak learning rate | 2.5e-4 |
| Final learning rate | 2.5e-5 |
| Warmup | First 100000000 supervised lexical tokens |
| Stable phase | Peak rate until 70% of the target token horizon |
| Cooldown | Cosine decay over the final 30% of the horizon |
| Effective optimizer update | Approximately 100000 supervised lexical tokens globally |

Warmup is part of the initial 70%, not an addition to the total horizon. Training stops after a complete optimizer update, so the realized token count can slightly exceed the requested horizon. Biases, normalization parameters, and learned query/key scales are excluded from weight decay.

The token clock and loss denominator serve different purposes. Supervised lexical tokens determine batching and learning-rate progress. Validation reports lexical-token loss with special targets excluded. Training preserves the exact objective used by each released model family, including their different weighting under accumulation.

For PAT, the objective is the sum of loss over all valid training targets divided by their count over the complete optimizer update, including all ranks and accumulation microsteps.

For FA, let `w` be the world size, `S_rm` the summed valid-target CE for rank `r` and microstep `m`, `C_m` the valid-target count across ranks in that microstep, `l_rm` that rank's lexical-token count, and `L` the lexical-token count across the complete optimizer update. The effective objective after distributed gradient averaging is:

```text
FA objective = sum_(r,m) [w * l_rm / (C_m * L)] * S_rm
```

On one rank, this is a lexical-count-weighted average of the microbatch valid-target mean losses. PAT instead uses `sum(S_rm) / sum(C_m)`. The distinction is fixed by model family to preserve checkpoint-training behavior; it is not an additional configuration option. Consequently, changing world size or accumulation can affect FA's objective when ranks contain different lexical and special-target proportions.

The implementation also preserves the arithmetic order: normalize each microstep's summed loss, then multiply by its accumulation weight. Distributed gradients synchronize after every microstep. Collapsing the factors or postponing communication until the final microstep can change floating-point results.

## Data construction

The paper uses approximately 100.001B content tokens, 44.05M documents, and 45.59M document pieces. The sources are FineWeb-Edu from [SmolLM-Corpus](https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus) and the Algebraic Stack, arXiv, peS2o, and StarCoder components of [OLMo-Mix-1124](https://huggingface.co/datasets/allenai/olmo-mix-1124).

| Source | Approximate content tokens |
|---|---:|
| FineWeb-Edu | 49.827B |
| Algebraic Stack | 12.545B |
| arXiv | 12.543B |
| peS2o | 12.543B |
| StarCoder | 12.543B |

Selection uses seed 42. One branch selects 60B tokens without a minimum document length; another selects 40B additional tokens from documents of at least 8192 tokens. The first branch also contains long documents. Exact duplicates are removed across sources and exact validation copies are excluded. No additional near-duplicate filter is part of this construction.

Ordinary byte-pair encoding treats literal special-token spellings as ordinary source text. Document order is retained within each document. Long documents become consecutive pieces capped at 16384 content tokens, including the final shorter remainder. Every piece receives BOS; only a document's final piece receives EOD. PAT memory states are introduced by the model. Unrelated documents never share an attention history.

Batch planning groups pieces into length buckets of width 20 while measuring each bin's budget in lexical tokens. Training uses preallocated bins, deterministic seeded placement, and a final batch shuffle; overflow and incomplete distributed optimizer windows are dropped for that epoch. Validation uses its fixed preallocated placement order and adds overflow bins, preserving every held-out piece. Neither behavior is exposed as an alternative batching mode.

Reproducing the paper's numerical training trajectory requires the exact prepared-data artifacts and their order, tokenizer files, model initialization, and batching. A corpus with the same approximate mixture or token count is not sufficient evidence of the same trajectory.

## Validation

The fixed holdout contains 14633 FineWeb-Edu documents and 15002471 content tokens. The short subset contains 14508 documents and 13162292 tokens; the long subset contains 125 documents and 1840179 tokens, represented by 165 pieces. The combined loss is token-weighted, not the arithmetic mean of short and long losses. Perplexity is `exp(cross_entropy)`.

The released 32-layer checkpoint pair has width 2048, 32 heads, approximately 1.715B parameters, and target 9520000000 supervised lexical tokens. The archived runs reached 9520047061 tokens. Reported final validation values are reference measurements from those runs:

| Model | Combined CE | Short CE | Long CE |
|---|---:|---:|---:|
| PAT-32 | 2.5801864771 | 2.5948254182 | 2.4754781753 |
| FA-32 | 2.6116588581 | 2.6243801552 | 2.5206669348 |

These are archived paper-run values, not new continuation-training endpoints. The [verification record](verification.md) supplies checkpoint identities, measured loader/evaluation comparisons, observed archive differences, and the separate 200M-token continuation results.

## Required release verification

The [release verification record](verification.md) identifies executed source snapshots, runtime, GPU, input artifacts, checkpoint hashes, numerical limits, and measured outcomes for the following verification scope:

1. Import the selected PAT-32 and FA-32 checkpoints without missing or unexpected learned tensors.
2. Compare logits and lexical loss against their original implementation over multiple chunk boundaries and variable-length document pieces.
3. Compare generation before and after checkpoint export/reload, including prompts ending within and exactly at chunk boundaries.
4. Verify causal behavior and isolation between packed documents.
5. Run training and compare optimizer updates and loss progress using identical seeds, input order, and token accounting.
6. Resume saved training and compare its continuation with an uninterrupted run.
7. Complete 200M-token local continued-training checks starting from each actual released 32-layer checkpoint, and retain the logs, resulting checkpoints, and exact counts. These checks use a fresh optimizer, a 200M-token horizon, 100M-token warmup, and 30% cooldown. The long checks exercise the released implementation. Separate bounded comparisons check the original and released implementations from identical initial weights and inputs; a smaller model does not qualify the released pair.

A completed 200M-token check establishes continued-training stability over that horizon. It does not establish agreement between two complete 200M-token trajectories or that a fresh multi-billion-token training run reproduces the final paper loss. State separately which checks have completed, which used small fixtures, and which exercised the full released checkpoints.

The measured receipts distinguish completed checks from the strict small-PAT resume-validation criterion that remained unmet. Passing native-evaluation and full-model functional-resume controls do not erase that result or establish deterministic training trajectories. Final archive build and anonymous download identity are attested by the external publication receipt and checksum.