The building-block architectures behind modern models — attention, MoE, state-space, positional, diffusion — each rated on how interesting and how unique it is, and many drawn as detailed distill-style diagrams.
Kimi K3 hybrid block + AttnRes
2026A hybrid block — KDA (gated delta-rule linear attention) interleaved with Gated MLA (full attention) and Stable LatentMoE — plus Block Attention Residuals: each residual add reads a gated mix of every earlier block.
Read bottom‑to‑top. Kimi K3 stacks a hybrid block — KDA (linear‑time attention), Gated MLA (full attention for exact recall) and Stable LatentMoE (shared + routed experts) — into the residual stream. The twist is Block Attention Residuals: every residual add pulls a gated read (α) off a bus carrying every earlier block’s output, not just the layer below — a learnable skip across the whole depth.
Mamba / selective state space (SSM)
2023A selective state-space model: a fixed-size state carried by a linear-time recurrence whose transition parameters depend on the input, giving content-based routing of information — a leading attention-free alternative.
Instead of attending over the whole sequence, Mamba scans it: a single fixed-size state is carried step to step by a linear recurrence, and the transition parameters (Δ, B, C) are computed from the input — so the model can selectively remember or forget while staying linear in length.
Transformer (decoder block)
2017The self-attention block that replaced recurrence: pre-norm → multi-head self-attention → residual, then pre-norm → MLP → residual, stacked N deep with a causal mask. Every architecture below is a variation on it.
Each block refines the token stream twice — self-attention lets positions mix, the MLP thinks per-token — and both sub-layers are wrapped in a normalize → transform → add residual, so the original signal (and its gradient) flows straight up through all N stacked layers.
Attention & KV-cache (MHA → MLA)
2019How the Key/Value side collapses to shrink the KV cache: MHA (one KV per query head) → MQA (one shared) → GQA (a few groups) → MLA (a single compressed latent up-projected on the fly), at near-equal quality.
The queries never change — only the Key/Value side collapses. Going MHA → MQA → GQA → MLA folds many KV heads into few, or into a single compressed latent, shrinking the per-token KV cache that dominates memory at long context while keeping quality nearly intact.
Mixture-of-Experts (sparse FFN)
2017Replace the dense FFN with many expert FFNs and a router that sends each token to only a few (plus an optional always-on shared expert). Parameters scale up while per-token compute stays flat.
Only the top-2 routed experts (plus an always-on shared expert) fire for any given token, so a layer can hold a huge pile of parameters while each token pays the compute of just a few small FFNs.
Diffusion Transformer (DiT / MMDiT)
2022A diffusion denoiser that is a Transformer over image latent patches, conditioned on the timestep and text through adaptive LayerNorm; MMDiT carries text and image tokens in separate streams that attend jointly.
A Diffusion Transformer denoises image latents by treating patches as tokens: a stack of blocks predicts the noise ε, while the timestep and caption are pooled through a small MLP that adaptively modulates each block’s norm (adaLN). In the MMDiT variant, image and text tokens keep separate projections but mix through one joint self-attention.
Looped / recurrent-depth Transformer
2018Reuse the same block for several passes to buy effective depth (and latent reasoning) without adding parameters — depth paid in FLOPs, not weights.
A looped Transformer runs one shared block over and over — the output of a pass is fed back as the next pass’s input — so it gets the effective depth of a much taller model while storing the parameters of just a single layer. The extra reasoning is paid for in compute, not weights.
Masked-diffusion language model
2025A non-autoregressive language model that generates by iteratively unmasking tokens under bidirectional attention — denoising a fully masked sequence over several steps instead of left-to-right.
Unlike a left-to-right autoregressive model that commits one token at a time, a masked-diffusion LM starts from an all-[M] sequence and, under bidirectional attention, unmasks a few tokens each step and re-predicts the rest — refining the whole sentence in parallel over T steps.
Rotary Position Embedding (RoPE)
2021Encode position by rotating each query/key vector by an angle proportional to its index, so the attention score depends only on the relative offset. The de-facto positional scheme in modern LLMs.
RoPE encodes a position by rotating each pair of feature dimensions by an angle proportional to that position. Because a dot product only cares about the angle between two vectors, attention ends up reading the relative distance (m − n) for free.
Mixture-of-Depths
2024A per-layer router lets each token either pass through the block or skip it via the residual, so compute is spent only where needed and effective depth becomes token-dependent under a fixed budget.
A router at every layer keeps only a fixed fraction of tokens for the block; the rest skip it through the residual connection. Because the selected set changes layer to layer, each token gets a different effective depth — and the network spends compute only where it helps.
Bidirectional encoder (BERT)
2018An encoder-only stack with full (non-causal) attention, pretrained by masking tokens and predicting them — so every position sees the whole sequence. Still the default for embeddings and classification.
BERT is a Transformer encoder: with no causal mask, every position attends to the whole sequence at once, so the hidden state for [MASK] is built from context on both sides. The MLM head then reads that position and predicts the missing word.
Encoder–decoder (seq2seq)
2017Two stacks: an encoder that reads the source bidirectionally, and a decoder that generates while cross-attending into the encoder's representations. The seq2seq form behind translation, T5 and BART.
The encoder reads the whole source at once and produces a set of vectors; the decoder generates the target left-to-right, and at each step its cross-attention queries that encoder output — the one wire that turns two stacks into a translator.