The Rabbit Hole / AI / Model architectures
Zyphra · Architecture mapZAYA1 (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)
Inside convolutional GQA · Attention layer, then MoE layer
Earlier context dimmed · current token bright · dashed regions contain cached entries.
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
- Embeddings: giving every token a meaning
- Residual connections: when more layers made things worse
- A whole LLM, layer by layer
- RMSNorm: keeping a token's scale under control
- Residual scaling: DeepNorm and learned scalescoming soonScales the skip path, by fixed constants or learned values, so deep stacks stay stable.
- Compressed convolutional attention (CCA): attention in a latent spacecoming soonAttention computed in a smaller latent space, with convolutions over neighbouring tokens.
- Routing: selecting experts and weighting their work
- Grouped-query attention (GQA): sharing keys and values in groups
- Mixture of experts (MoE): a big model that uses only part of itself
- Zero-computation experts: letting easy tokens spend lesscoming soonExperts that do nothing, so easy tokens can use less compute.
- Partial RoPE: rotating only part of each head
- RoPE: position as a rotation
- Transformer layers: attention is only half of what you need
- RWKV: recurrent inference, parallel trainingcoming soonExplore how RWKV combines a recurrent state at inference with training-friendly parallel computation.
- The KV cache: why LLMs remember every key and value
- Attention, from scratch
Sources for this map
- ZAYA1-base config.json
- ZAYA1-base model card
- Zyphra transformers fork, branch zaya: modeling_zaya.py (CCA, router, residual scaling, decoder layers)
- Training Foundation Models on a Full-Stack AMD Platform (ZAYA1 report)
- Compressed Convolutional Attention (CCA paper)
- Context length: the report extends the context from 4k to 32k in pretraining; the config sets 32,768 positions