Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

Zyphra · Architecture map

ZAYA1 (8.3B, 0.8B active)

A small mixture of experts that does attention inside a compressed latent space, routes each token with a small MLP instead of a linear layer, and puts a learned gate on the residual stream.

ZAYA1-base, November 2025 · ZAYA release timeline

Inside ZAYA1 (8.3B, 0.8B active)

Parameters
8.3B · 0.8B active
Layers
80 sublayers · 40 pairs
Width
2,048
Mixer
Grouped-query
Select a component to explore it.
The complete ZAYA1 (8.3B, 0.8B active) architectureInput IDs select embeddings. Each layer adds its updates along the residual stream. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head. Per attention layer, 2 key/value heads of 128 values each for keys and for values: 512 values per token. Each attention layer also keeps a small convolution state (the last 2 positions of the packed queries and keys) and the previous token's hidden state, both of fixed size. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup262,2722,048Input token vectorsCL2,048Attention layer, then MoE layerAttention layer, then MoE layer · 40 repetitions40 layers · one layer shown40RMSNorm before this operation.RMSNormCompressed conv: Zyphra's config lists 80 layers that alternate: an attention layer, then a feed-forward layer, 40 of each. This page draws each pair as one block. The feed-forward layer holds 16 experts of 2048 hidden width (gated SwiGLU) and picks 1 per token. A small MLP router chooses it, and a 17th 'skip' expert lets a token bypass the experts.Compressed convRotate query and key position components before attention scores; values are unchanged. Zyphra's config lists 80 layers that alternate: an attention layer, then a feed-forward layer, 40 of each. This page draws each pair as one block. The feed-forward layer holds 16 experts of 2048 hidden width (gated SwiGLU) and picks 1 per token. A small MLP router chooses it, and a 17th 'skip' expert lets a token bypass the experts.Partial RoPENormalise queries and keys before attention scores. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.QK L2-normZyphra's config lists 80 layers that alternate: an attention layer, then a feed-forward layer, 40 of each. This page draws each pair as one block. The feed-forward layer holds 16 experts of 2048 hidden width (gated SwiGLU) and picks 1 per token. A small MLP router chooses it, and a 17th 'skip' expert lets a token bypass the experts.Q/K convolutionResidual with learned scale and bias. Combine the residual and branch contributions using the model’s learned weighting. +RMSNorm before this operation.RMSNormMoE: Zyphra's config lists 80 layers that alternate: an attention layer, then a feed-forward layer, 40 of each. This page draws each pair as one block. The feed-forward layer holds 16 experts of 2048 hidden width (gated SwiGLU) and picks 1 per token. A small MLP router chooses it, and a 17th 'skip' expert lets a token bypass the experts.MoE1 of 16 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts.Residual with learned scale and bias. Combine the residual and branch contributions using the model’s learned weighting. +1 of 16 expertsResidual streamLast columnCL2,048Final RMSNormReuses the embedding table, transposed.Tied output weights2,048262,272Vocabulary scoresSoftmax262,272Next-token probabilities
Inside convolutional GQA · Attention layer, then MoE layer
4 query heads per group × 2 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

ZAYA1 (8.3B, 0.8B active): Attention layer, then MoE layer · convolutional GQACompressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head. Per attention layer, 2 key/value heads of 128 values each for keys and for values: 512 values per token. Each attention layer also keeps a small convolution state (the last 2 positions of the packed queries and keys) and the previous token's hidden state, both of fixed size.2 KV groups; the front face shows one representative.2 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,048CLWq. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Wq2,048128Wk. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Wk2,048128Wv. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Wv2,0481282 × Conv 2. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.2 × Conv 2L2-norm. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.L2-normRoPE 64. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.RoPE 642 × Conv 2. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.2 × Conv 2L2-norm. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.L2-normRoPE 64. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.RoPE 64Key scale. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Key scale½ + ½. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.½ + ½K cache. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache128CLV cache. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache128CLQ context. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Q context128CLScaled query–key scores, masking and softmax. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.CLCL×. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.×Joined heads. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.8Wo. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Wo1,0242,048Attention output. Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,048CL
Model-specific details
Attention layer, then MoE layer · 40 repetitions
Zyphra's config lists 80 layers that alternate: an attention layer, then a feed-forward layer, 40 of each. This page draws each pair as one block. The feed-forward layer holds 16 experts of 2048 hidden width (gated SwiGLU) and picks 1 per token. A small MLP router chooses it, and a 17th 'skip' expert lets a token bypass the experts.
Attention and positions
Compressed convolutional attention (CCGQA). The model has 16 heads of 128, but attention runs on a compressed copy: 8 query heads (query compression 2x) and 2 key/value heads (key/value compression 8x), all 128 wide. Queries and keys go through two short convolutions along the sequence (kernel 2 each). Half of each value comes from the current token and half from the previous token. Queries and keys are L2-normalised per head. A learned temperature scales the keys. RoPE rotates half of each head.
Memory
Per attention layer, 2 key/value heads of 128 values each for keys and for values: 512 values per token. Each attention layer also keeps a small convolution state (the last 2 positions of the packed queries and keys) and the previous token's hidden state, both of fixed size.

Alternating compressed attention and experts

Attention-only layers alternate with expert-only layers. Attention compresses queries 2:1 and keys/values 8:1, with short convolutions and a 512-value cache per token. RoPE rotates half each head.

Expert layers select one of 16 experts of width 2,048, with no shared expert. A three-layer router also receives the preceding expert layer’s router state; its optional skip choice bypasses expert computation.

Learned scales and biases act on the residual and layer inputs. Embeddings are tied. The context-extension stage reaches 32K.

Explore the components

Sources for this map