Systolic Linear Attention: Co-Designing Tile-Grouped Gated Delta Attention for TPUs
Organizations: Google
Abstract
Gated-delta linear attention layers such as Gated DeltaNet (GDN), Kimi Delta Attention (KDA), and GDN-2 are tuned for GPUs, where small tensor-core tiles and fast vector registers make per-channel decay rescaling and sequential in-block solves cheap. On Google TPUs, which concentrate compute in wide systolic matrix units backed by a slower vector unit, porting these layers directly leaves half of each matrix tile empty and bottlenecks on vector operations. We present Systolic Linear Attention (SLA), which reshapes gated delta attention around the matrix unit by widening keys to with grouped value heads, grouping decay gates into four -channel tiles, and computing the chunk solve entirely with block matrix products in a single fused kernel. On TPU v7x, a full SLA-R4 layer runs -- faster than the open-source Tokamax KDA kernel (-- with exact chunk inversion), driven primarily by head sharing and kernel fusion. Across a -chip TPU v7x pre-training study of sparse Mixture-of-Experts (MoE) models from to parameters, SLA trains -- faster than KDA at similar perplexity, and reaches slightly lower perplexity than KDA in smaller matched-seed runs.
Figures & tables
| Accelerator | Cores | Array Tile | BF16 TF/s | 8-bit TF/s ∗ | VPU TF/s | MXU:VPU | HBM (GB) | HBM GB/s | Ridge |
|---|---|---|---|---|---|---|---|---|---|
| H100 SXM | 132 SM | 989 | 1,979 | 67.0 | 80 | 3,350 | 295 | ||
| TPU v4 | 2 | 275 | 275 | 3.2 | 32 | 1,200 | 229 | ||
| TPU v5p | 2 | 459 | 918 | 5.4 | 95 | 2,765 | 166 | ||
| TPU v6e | 1 | 918 | 1,836 | 7.2 | 32 | 1,600 | 574 | ||
| TPU v7x | 2 | 2,307 | 4,614 | 18.0 | 192 | 7,373 | 313 |
| Symbol | Meaning |
|---|---|
| Sequence length; chunk length ( ); chunk index . | |
| Token indices inside a chunk, (with chunk-entry boundary in ). | |
| Model width; number of query-key heads; number of value heads; sharing ratio . | |
| Key width ( ); per-value-head width; packed value width per key head ; total value width . | |
| Number of decay tiles ( ), tile width , tile index . | |
| , | -normalized query and key of one key head; packed values of its value heads. |
| Design Axis | GDN [ 68 ] | KDA [ 71 ] | GDN-2 [ 25 ] | SLA ( SLA-R2 / SLA-R4 ) (Ours) | SPD-SLA-W (Section 4 ) |
|---|---|---|---|---|---|
| Key/Value Heads | Unpacked | Unpacked | Unpacked | Packed GVA ( ) | Packed GVA |
| State Tile & Dtype | FP32 ( pad) | FP32 ( pad) | FP32 | BF16 / Row-FP8 (no padding) | BF16 / Row-FP8 |
| Forget Gate | Scalar ( ) | Channel ( ) | Decoupled ch. ( ) | Tile-grouped ( ) | Tile-grouped ( ) |
| Step Size | per | per | Ch. vector per | scalar per (neg. eig.) | Clamped |
| Chunk Gram | MXU + scalar mask | -row VPU pivots ( ) | Decoupled ch. broadcast | pure MXU ( , ovf.) | Oblique MXU |
| Chunk Inverse | blocked, sequential in-block | blocked, sequential in-block ( Tokamax) | blocked, sequential in-block | Exact Inv. (or -Step Neumann, ) | MXU inverse + Polar-2+ ( MM) |
| Configuration | Loss @ | |
|---|---|---|
| KDA (per-channel decay, FP32 state) | – | |
| SLA, (two runs) | / | |
| SLA, | ||
| SLA, , input-dependent | adaptive | |
| SLA, (two runs) | / | |
| SLA, |
| Stage Latency ( ) | KDA (Unf.) | KDA (Fus.) | SLA-R4 (Unf.) | SLA-R4 (Fused) |
|---|---|---|---|---|
| Op 1: QKV + Gate Proj (MXU) | 0.251 | 0.251 | 0.168 | 0.168 |
| Op 2: Causal Conv4 + QK Norm | 0.562 | \left.\begin{array}[]{@{}c@{}}\text{Fused}\\[0.77498pt] 3.104\end{array}\right\} | 0.341 | \left.\begin{array}[]{@{}c@{}}\text{Fused}\\[0.77498pt] 1.112\end{array}\right\} |
| Op 3–5: Gram + WY Inversion | 1.184 | 0.418 | ||
| Op 6: Chunk State Scan ( ) | 1.248 | 0.614 | ||
| Op 7a: Intra + State Readout | 0.219 | 0.219 | ||
| Op 7b–7c: Out Norm + Out Proj | 0.255 | 0.255 | 0.245 | 0.245 |
| Regime | Kernel or Full Layer ( , Chunk , State) | Fwd | Bwd | F+B | Spd. | F+B | Spd. | Temp HBM |
| (a) Core Kernel ( MoE) | Open-Source MaxText Pallas KDA ( , FP32) | 3.320 | 2.000 | 5.320 | 20.430 | – | ||
| Open-Source Tokamax Mosaic KDA ( , Base) | 1.951 | 1.403 | 3.354 | 12.449 | – | |||
| SLA-R2 ( , BF16) | 1.960 | 0.905 | 2.865 | 10.153 | – | |||
| SLA-R4 ( , BF16) | 1.371 | 0.671 | 2.042 | 6.175 | – | |||
| (b) Iso-Controls Core Kernel | Open-Source MaxText Pallas KDA ( , FP32) | 2.668 | 1.580 | 4.248 | 16.455 | – | ||
| Open-Source Tokamax Mosaic KDA ( , Base) | 1.072 | 0.781 | 1.853 | 5.829 | – |
| TPU Generation | Array Tile | MXU:VPU (BF16) | KDA Measured (ms) | SLA-R4 Measured (ms) | Measured Speedup | Out-of-Fold LOO Pred. (Error) |
|---|---|---|---|---|---|---|
| TPU v4 | ( ) | |||||
| TPU v5p | ( ) | |||||
| TPU v6e | ( ) | |||||
| TPU v7x | ( ) |
| Regime | Architecture / Method ( L, ) | TTFT | TTFT | TTFT | Cache/Lyr |
|---|---|---|---|---|---|
| (a) L Prefill Full TTFT ( ) | 0L:1A Dense GQA ( , KV heads) | ( ) | KV | ||
| 15L:1A MaxText KDA ( , FP32) | ( ) | FP32 | |||
| 7L:1A SLA-R4 ( , BF16) | ( ) | BF16 | |||
| 15L:1A SLA-R4 ( , FP8) | ( ) | FP8 | |||
| Regime | Attention-Layer Serving ( tok/s/chip ) † | KV+State ( ) | |||
| (b) Serving Tree Verify ( ) | 0L:1A Dense GQA ( ) | OOM | OOM |
| (a) MoE CP=EP=128 F+B | ( tok/s/ch ) | ( tok/s/ch ) | ( tok/s/ch ) | ( tok/s/ch ) | HBM / Mixer ICI |
|---|---|---|---|---|---|
| 0L:1A Full-Attn Ring-CP | ( ) | ( ) | ( ) | ( ) | / |
| 7L:1A MaxText KDA Tree ( ) | ( ) | ( ) | ( ) | ( ) | / |
| 7L:1A Iso-Param SLA Tree-CP R4 | ( ) | ( ) | ( ) | ( ) | / |
| 15L:1A MaxText KDA Tree ( ) | ( ) | ( ) | ( ) | ( ) | / |
| 15L:1A Ring-State LASP R2 | ( ) | ( ) | ( ) | ( ) | / |
| 15L:1A SLA Tree-CP R2 NoMom / +Mom | ( / ) | ( ) | ( ) |
| Architecture / Scaling Parameter | Rung 1 | Rung 2 | Rung 3 | Rung 4 |
|---|---|---|---|---|
| Cohort Label (Active / Total) | ||||
| Exact Total Params (KDA / SLA-R2 ) | ||||
| Exact Active: incl. ( FLOP) ∗ | ( ) | ( ) | ( ) | ( ) |
| Decoder Depth & Hybrid Cycle | ( 4L : ) | ( 7L : ; 15L ) | ( 4L : ) | ( 4L : ; 15L ) |
| Model Width ( /block) | ( ) | ( ) | ( ) | ( ) |
| Embeddings + Untied LM Head ( ) | ( ) | ( ) | ( ) | ( ) |
| Cohort | Architecture ( Steps) | Step (ms) | -Set PPL | Tail | Tail | -N | SQuAD | Hotpot |
| (a) v7x Tok ( Ch., /st.) | 0L:1A Full-Attn GQA+RoPE ( s0 ) | 2,313.8 | 16.128 | 10.57 | 10.48 | |||
| 7L:1A MaxText KDA Base ( ) ∗ | 10.46 | |||||||
| Zero-Retrain Clamp ( s0 ) | – | 16.168 | 10.53 | 10.26 | ||||
| 7L:1A KDA + TrainMaxTau=8K ( ) | 10.46 | |||||||
| 7L:1A SLA-R2 (BF16, ) ∗ | 10.46 | |||||||
| 7L:1A SLA-R4 (Iso-Param, ) ∗† | 10.57 |
| MoE ( Tok, Chips, NoPE ) | Step (ms) | tok/s/ch | -Set PPL | Tail | -N | SQuAD | Hotpot |
|---|---|---|---|---|---|---|---|
| 4L:1A MaxText KDA Base ( , FP32) | 2,165.1 | 15,135 | 12.596 | 353.4 | |||
| Zero-Retrain Clamp ( retr.) | – | – | 12.596 | 7.70 | |||
| Clamp SSMax ( ) | – | – | 12.596 | 8.04 | |||
| 4L:1A SLA-R2 ( , BF16, Bytes) | 1,952.9 | 16,779 | 12.584 | 13.78 | |||
| Zero-Clamp SLA-R2 SSMax ( ) | – | – | 12.584 | 8.45 | – | – | |
| 4L:1A SLA-R4 ( , BF16, Bytes) † | 1,878.3 | 17,445 | 12.454 | 20.47 |
| HLO Category ( xplane Measured) | 4L:1A KDA Base | 4L:1A SPD-SLA-W (R2) | 4L:1A SLA-R4 | (SLA-R4 vs. KDA) |
| Pallas Linear Attention custom-call | ( ) | |||
| VPU Gate / Norm loop fusion | ( ) | |||
| Causal Short convolution fusion | ( ) | |||
| ICI Collective async-done Wait | ( ) | |||
| MoE Expert ragged-dot + Dense Matmul | ( ) | |||
| Total Steady-State Step Time | ( ) |
| GA=4 Arm ( profiled steps) | Step Mean (ms) | linear_mixer _pallas | short_conv _fusion | Mixer + Conv | full_attn _splash | all_gather _rs | moe_ragged _a2a |
|---|---|---|---|---|---|---|---|
| 7L:1A MaxText KDA (default AR) | 2,118.9 | 508.1 | 91.7 | 599.8 | 69.8 | 191.9 | 264.7 |
| 7L:1A MaxText KDA + defer_ar | 2,119.7 ( ) | 528.4 | 91.6 | 620.0 | 70.0 | 191.6 | 234.3 |
| 7L:1A SLA (Fused) R2+Mom + defer_ar | 1,797.4 ( ) | 340.9 ( ) | 65.4 | 406.3 ( ) | 69.9 | 152.5 | 282.5 |
| 7L:1A Iso-Param SLA (Fused) R4 + defer_ar | 1,686.0 ( ) | 269.1 ( ) | 61.7 | 330.8 ( ) | 69.7 | 152.6 | 265.3 |
| Scale, Horizon, & Trained Checkpoint | Within-Tile Std | Unclamped Tail / -N | Intervened Tail / -N (Proj. ) | Unclamped SQuAD / Hotpot | Intervened QA (Proj. / Note) | |
|---|---|---|---|---|---|---|
| 4L:1A MaxText KDA ( ) | 128 | 4.41 | ( ) | ( ) | ||
| 4L:1A KDA + TrainMaxTau ( ) | 128 | (co-capped) | ( ) | |||
| 4L:1A Iso-Param SLA-R4 ( ) | 4 | 0.00 | ( ) | (invariant) | ||
| 7L:1A MaxText KDA ( , s0 ) | 128 | 4.58 | ( ) | ( ) | ||
| 7L:1A KDA + TrainMaxTau ( , ) | 128 | (co-capped) | ( ) | ( ) | ||
| 15L:1A MaxText KDA ( ) | 128 | 4.97 | ( ) | ( ) |
| Exact Inv. FP32 Arm ( ) | ( ) | Within-Tile Std | s0,s1 Mean PPL ( Mean) ∗ | Paired vs. ( s0..s2 ) | Tail | -N / -N | norm9 | SQuAD / Hotpot |
|---|---|---|---|---|---|---|---|---|
| Full-Tile Scalar Decay ( ) | 1 ( ) | 0.00 | ( ) | (ref) | ||||
| Systolic Sub-Tile Default ( ) | 4 ( ) | 0.00 | ( ) | ( ) | ||||
| Intermediate Sub-Tile ( ) | 16 ( ) | 4.34 | ( ) | ( ) | ||||
| Fine Sub-Tile Decay ( ) | 64 ( ) | 5.05 | ( ) | ( ) | ||||
| Per-Channel Wide-Key ( PPL, OOD) | 256 ( ) | 4.78 | ( s0,s1 ) | ( ) |
| Whitening / Second-Order Solver | Ops | Fwd (ms) | F+B (ms) | ( c BF16) | |
|---|---|---|---|---|---|
| MesaNet Gated CG-30 | VPU+MXU | – (CG) | |||
| Panel-16 Cholesky (VPU) | Tri. Solve | (SPD) | |||
| Coupled Newton-Schulz ( NS-5 ) | MM | (SPD) | |||
| Polar-2 Unscaled ( ) | MM | (Indef.) | |||
| Polar-2+ Safe ( ) | (SPD) |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Mechanism / Update Rule | Axis-Aligned (FP32) | Hadamard-Rot. (FP32) | Write-Once BF16 [FP32] | Overwrite BF16 [FP32] | Overwrite BF16 [FP32] | Mod- Parity ( ) |
|---|---|---|---|---|---|---|
| Mamba-2 / SSD (Scalar Hebbian) | [ ] | [ ] | [ ] | ( ) | ||
| KDA Real Channel Decay ( ) | [ ] | [ ] | [ ] | ( ) | ||
| Diagonal Preconditioned Delta [ 62 ] | [ ] | [ ] | [ ] | ( ) | ||
| MesaNet Unforgetted ( ) [ 64 ] | [ ] | [ ] | [ ] | ( ) | ||
| MesaNet Gated ( ) | [ ] | [ ] | [ ] | ( ) | ||
| MesaNet Aggressively Gated ( ) | [ ] | [ ] | [ ] | ( ) |
Linear Attention
Linear attention reduces sequence-length costs by replacing pairwise token interactions with kernel features, recurrent states, or compact memory.
See all 140 papers