Latent encoder

Pinned implementation and paper LDLM @ e18c42a, not yet public · arXiv:2605.07933v1 · OpenWebText · 1024 · checkpoint, tokenizer and saved statistics not verified · How to read

in
hh [B batch, T positions, 768 d]
out
z0z_0 [B batch, T positions, 768 d]
parameters
51,161,856
Parameters

51,161,856 parameters per instance, across its learned components

Exact per-instance accounting
ComponentCalculationParameters
Position table1,024×7681{,}024 \times 768786,432
Learned latent queries1,024×7681{,}024 \times 768786,432
Input RMSNorm768768768
Encoder block8,264,576×68{,}264{,}576 \times 649,587,456
Output RMSNorm768768768
Per-instance total51,161,856

Derived from the pinned implementation’s constructors and configuration. The checkpoint’s tensors have not been counted. 306,011,162 of these parameters are trained; frozen GPT-2 and the decoder’s mask vector, 124,442,112, are not.

Explanation

The latents do not start from the text: they start from the same 1,024 learned vectors for every sequence, and everything they know of the text they read from the features through attention.

There are as many latents as positions (num_latents follows max_sequence_len), so nothing is compressed along the sequence.

Sources4

Direct evidence

The encoder owns the learned latent queries, a position table, an input and an output RMSNorm and the blocks.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The encoder adds positions to the features, normalizes the learned queries, applies the blocks, each attending to the features, and normalizes the result.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The latent encoder: 12 heads of 64 features, query and key normalization, softcap 50, 6 layers, MLP multiplier 4, dropout 0.1, ε = 10⁻⁵.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The feature model is GPT-2, frozen; the hidden state at index −3 is extracted; the encoder and the decoder are of the Perceiver kind; the file’s vocabulary size and mask token ID are defaults that the trainer overwrites with the tokenizer’s; there are as many latents as positions, of 768 features.

The implementation, pinned at revision e18c42acdfb7, not yet public