Looped Latent Attention: Cross-Loop KV Compression for Looped Transformers

· Source: Computation and Language · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Natural Language Processing · Depth: Expert, quick

Summary

Looped Latent Attention (LLA) is a novel post-training cache codec designed for Looped Transformers, which typically reuse a block to reduce parameters but still store a separate K/V cache for each recurrence step. LLA addresses this by exploiting the low-rank trajectory of K/V vectors across loops, storing compact K and V latents and reconstructing loop-specific vectors only when needed. The system, initialized via SVD and refined with KL and attention-output distillation, offers a per-head codec for recurrence compression and an LLA-2D variant for extreme compression by folding heads. LLA outperforms alternative cache reduction methods like head-axis MLA and KV quantization at equivalent cache budgets. It achieves near-lossless 32x compression on Huginn-3.5B and increases Ouro-1.4B batch capacity from 32 to 768 sequences (21.3x compression) at 4k context on an H200. Furthermore, on-policy refinement improves MATH-500 scores from 0.43 to 0.66.

Key takeaway

For Machine Learning Engineers optimizing inference for recurrent Transformer models, Looped Latent Attention (LLA) presents a critical method to drastically reduce K/V cache memory. You should consider implementing LLA to achieve up to 32x cache compression, significantly increasing batch capacity—e.g., from 32 to 768 sequences for Ouro-1.4B at 4k context on an H200. This directly improves throughput and can enhance performance on long context tasks like math rollouts by reducing errors and boosting accuracy.

Key insights

Looped Latent Attention compresses K/V caches in Looped Transformers by exploiting low-rank recurrence, significantly boosting inference efficiency.

Principles

Method

LLA uses SVD-initialized and KL/attention-output distilled codecs to store compact K/V latents, reconstructing loop-specific vectors on demand.

In practice

Topics

Best for: MLOps Engineer, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.