Surpassing RAG with 20% Memory: ASM Latency Optimization on the NBA Benchmark

Long-context inference faces two constraints at once: memory use grows with the prefix, while latency rises at every decode step. Attention-State Memory (ASM) offers a training-free alternative by externalizing precomputed attention states into a lightweight lookup-based memory. On the NBA Benchmark, it exceeded full-attention RAG performance using about 20% of the memory. This article explains ASM’s hierarchical lookup and online-softmax merge, then maps the boundaries that matter in deployment: query-distribution stability, prefix updates, offline construction, and codebook-size tuning.