CCA Slashes Transformer Inference Costs by 1.7x Without Losing Quality
A research team behind Zyphra proposes running attention entirely inside a compressed latent space, cutting parameters, KV-cache, and FLOPs simultaneously.
ProTakeaways
- New paper introduces Compressed Convolutional Attention, running attention entirely in a down-projected latent space.
- Cuts parameters, KV-cache, and FLOPs simultaneously by the compression factor, unlike GQA and MLA.
- CCGQA variant combines latent compression with head-sharing, achieving 8x KV-cache reduction with no quality loss.
- Fused H100 kernel delivers 1.7x prefill speedup at 16k sequences and 1.3x faster backward pass versus MHA.
- Adds convolutional mixing, QK-mean residual, and value-shift operations to preserve expressivity in the compressed space.
- RoPE integrates natively without the separate shared cache MLA requires; friendlier to tensor and context parallelism.
A team of researchers has published a paper introducing Compressed Convolutional Attention (CCA), a redesign of the attention block that attacks the three costs of transformer inference at once: parameter count, KV-cache size, and FLOPs. The trick is doing the entire attention operation inside a down-projected latent space rather than up-projecting back to the model dimension before the softmax.
The paper, authored by Tomas Figliolia, Nicholas Alonso, Rishi Iyer, Quentin Anthony, and Beren Millidge, also presents a grouped variant called CCGQA that combines latent compression with head-sharing. On H100 GPUs, their fused CCA/CCGQA kernel reduces prefill latency by about 1.7x at a sequence length of 16k relative to MHA, and accelerates backward by about 1.3x.
Where prior tricks stop short
Long-context transformers get expensive in two different ways. During training and prefill, the quadratic QK^T matmul dominates compute. During autoregressive decoding, the linearly growing KV-cache dominates memory bandwidth. Methods such as Grouped Query Attention (GQA) and Multi-Latent Attention (MLA) have reduced the size of the key-value (KV) cache, but they do not substantially reduce the core compute cost of attention.
GQA shares K and V heads across groups of query heads, which shrinks the cache but leaves the number of QKV multiplications untouched. MLA, used in DeepSeek models, projects keys and values into a smaller shared subspace for caching, then up-projects them back to full dimension before doing attention. That up-projection is the catch: MLA never actually does the attention math in the compressed space, so it inherits MHA-level FLOP costs during training and prefill. It also has an awkward interaction with rotary position embeddings (RoPE), forcing a separate shared RoPE key cache.
Attention in the shrunk space
CCA takes the more aggressive route. It down-projects Q, K, and V into a latent of width E/C where C is the compression factor, and then performs the full attention operation inside that shared latent space. Because the up-projections are gone entirely, both the projection matmuls and the QK^T quadratic term shrink by a factor of C. RoPE just gets applied directly in the latent, no separate cache required.

Naively doing attention on compressed QKV vectors hurts quality. To recover expressivity, CCA adds three lightweight operations that together add negligible FLOPs:
- Sequence and channel convolutions on the compressed Q and K, which the authors describe as a lightweight preconditioner prior to attention that smooths information transfer.
- QK-mean: a residual that adds the mean of pre- and post-convolution Q and K back into the flow, effectively giving the model a way to interpolate how strong the convolution should be.
- Value-shift: half the value heads see the current token embedding, the other half see the previous one, generated by independent projections. This is conceptually similar to RWKV's token-shift and adds a useful inductive bias.
Combining compression with head-sharing
The paper's second contribution is noticing that latent compression and head-sharing are orthogonal. CCGQA layers GQA-style K/V sharing on top of the already-compressed latents, and even lets you decouple query and key/value compression rates with separate factors C1 and C2. That gives a smooth Pareto curve between compute-bound and memory-bandwidth-bound regimes. Users can trade memory bandwidth and FLOP cost flexibly, tuning compression either for compute or memory.

What the numbers say
Experiments cover both a 1B parameter dense Llama3-style transformer trained on 300B tokens of the Zyda2 dataset, and a 350M active / 1.5B total MoE trained for 50B tokens. Across configurations:
- CCGQA consistently outperforms both GQA and MLA at equal KV-cache compression on dense and MoE models. CCGQA outperforms all other attention methods on MoE models with half the KV-cache of GQA and MLA, achieving an 8x KV-cache compression with no drop in performance compared to standard MHA.
- Ablations show most of the quality gain comes from the sequential convolutions, with QK-mean and value-shift adding smaller but consistent improvements.
- The fused H100 kernel delivers roughly 1.6 to 1.9x forward-causal speedups over MHA at 16k sequences depending on head dimension.
Where it fits and where it doesn't
CCA is not a linear-attention replacement. The authors are explicit that it does not touch the fundamental quadratic scaling of self-attention. What it does is shrink the constant in front of that S^2 term by a factor of C. A 16x compressed CCA lets you process 4x longer sequences for the same FLOP budget, which matters most when serving reasoning models with long chains of thought or handling long-context prefill workloads.
The authors also flag a concern worth taking seriously: CCA adds more inductive bias to the attention block than MLA or GQA, which just do linear projections. That extra structure may help at small scales but the advantages could shrink at frontier scales. Verifying the trend at larger model sizes remains open work.
One nice practical property is parallelism-friendliness. Unlike MLA, which becomes awkward under tensor parallelism because the shared KV latent must be replicated across devices, CCGQA shards cleanly since its arithmetic intensity is n_groups, matching GQA. Context parallelism also gets cheaper because rings and trees only need to communicate the smaller latent width E/C.
PyTorch reference code for CCA and CCGQA is included in the paper's appendix, and the fused H100 kernel that produces the reported latency numbers backs the theoretical FLOP model. The mechanism has already been picked up in follow-up work, including an appendix reference in a separate paper on training foundation models on AMD hardware, suggesting the community sees value in the compressed-latent-attention approach for future architectures.