Self-attention

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
yattny_{\mathrm{attn}} [B batch, T positions, 768 d]
out
Δattn\Delta_{\mathrm{attn}} [B batch, T positions, 768 d]
parameters
2,359,296 · × 3 blocks = 7,077,888
Parameters

2,359,296 parameters per instance, across its learned components

Exact per-instance accounting
ComponentCalculationParameters
Query, key and value projection768×2,304768 \times 2{,}3041,769,472
Output projection768×768768 \times 768589,824
Per-instance total2,359,296

Across 3 independent blocks: 2,359,296×3=7,077,8882{,}359{,}296 \times 3 = 7{,}077{,}888 parameters.

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

Attention is bidirectional: no position is masked.

The token decoder’s blocks set the softcap to 0, which turns it off.

Sources2

Direct evidence

A block owns two gain-only LayerNorms, a fused query–key–value projection and an output projection without bias, an MLP of the configured kind, and, with modulation, an affine layer from the time condition to six vectors, initialized at zero.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

A block normalizes, modulates by the time condition’s shift and scale, projects to queries, keys and values, rotates queries and keys, attends over all positions with softcap, and adds the projected output scaled by a gate; the MLP branch does the same with its own shift, scale and gate.

The implementation, pinned at revision e18c42acdfb7, not yet public