NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Combating the Memory Walls: Optimization Pathways for Long-Context Agentic Llm Inference

Haoran Wu, Can Xiao, Jiayi Nie, Xuan Guo, Binglei Lou, Jeffrey T. H. Wong, Zhiwen Mo, Cheng Zhang, Przemyslaw Forys, Chengyang Ai, Timi Adeniran, Wayne Luk, Hongxiang Fan, Jianyi Cheng, Timothy M. Jones, Rika Antonova, Robert Mullins, Aaron Zhao

TL;DR

PLENA is a hardware-software co-designed accelerator specifically engineered to handle the massive context windows required by modern AI agents. By utilizing a novel "flattened" systolic array and an asymmetric quantization strategy, it achieves up to 8.5× higher hardware utilization and 2.24× higher throughput than an NVIDIA A100 GPU for long-context tasks.

What Problem Does This Paper Address?

As LLMs evolve from simple chatbots into "agentic" systems—capable of browsing the web, writing complex codebases, or using software tools—their context requirements have exploded. While a typical chatbot might handle a few thousand tokens, an agent analyzing a webpage DOM or a large repository needs context windows spanning hundreds of thousands, or even a million, tokens.

This shift hits two "Memory Walls":

  1. The Bandwidth Wall: Moving massive amounts of model weights and Key-Value (KV) caches from off-chip memory (HBM) to the compute units is too slow, leaving the processors idling.
  2. The Capacity Wall: Long sequences generate enormous KV caches that quickly exhaust available memory, limiting the batch sizes that hardware can process.

Current hardware, like GPUs and TPUs, is built around square systolic arrays optimized for "square" matrix math. However, long-context inference involves "fat" GEMMs (General Matrix-Matrix Multiplications)—where the batch size is small but the sequence or hidden dimensions are massive. This mismatch leads to significant hardware underutilization.

Methods

The authors introduce PLENA (Programmable Long-context Efficient Neural Accelerator), which tackles these walls through three primary optimization pathways:

  • Flattened Systolic Array: Instead of the traditional square grid (e.g., 64x64), PLENA uses a "flattened" architecture (e.g., 8x512). This shape natively matches the lopsided dimensions of long-context inference, ensuring nearly 100% of the multipliers are active even when the batch size is small.
  • Asymmetric Quantization & Microscaling (MX): PLENA employs different precisions for different data types. While activations remain in higher precision to preserve accuracy, weights and KV caches are aggressively compressed to 4-bit using Microscaling (MX) formats. To handle the "outliers" (extreme values) that usually break low-bit quantization, they implement a Selective Online Rotation (Hadamard transform) directly in the hardware.
  • Native FlashAttention Support: The system includes a custom Instruction Set Architecture (ISA) that supports FlashAttention. This allows the hardware to fuse the Attention-Softmax-Attention steps on-chip, drastically reducing the need to write intermediate results back to slow off-chip memory.
  • Automated Co-Design Flow: The team developed a full stack, including a compiler and a cycle-accurate simulator. They used Bayesian Optimization to automatically search the "design space" for the best combination of hardware dimensions and quantization precisions for a given model.

Datasets

The researchers evaluated PLENA across several dimensions:

  • Models: LLaMA-2 (7B to 70B), LLaMA-3/3.1/3.3 (8B to 70B), and Mixture-of-Experts (MoE) models like GPT-OSS.
  • Benchmarks: Accuracy was measured using WikiText-2 (perplexity).
  • Workload Analysis: They analyzed "agentic" workloads using benchmarks like WebArena (web browsing), LiveCodeBench (coding), and Longwriter (long-form generation) to characterize token consumption patterns.

Key Insights and Ideas

  • The "Fat GEMM" Realization: The most critical insight is that as context grows, the compute-to-memory ratio shifts. In the decoding phase of a 128k-token sequence, the KV cache becomes the dominant memory consumer, forcing batch sizes down to 1. Square systolic arrays are mathematically inefficient for these "thin" batch operations; flattening the hardware is the logical architectural response.
  • Quantization is not Binary: You don't have to choose between 16-bit and 4-bit for the whole model. By treating activations, weights, and KV caches as distinct entities with different sensitivities, PLENA maintains high accuracy (within 0.05 perplexity of the baseline) while slashing memory traffic.
  • ISA Matters: General-purpose ISAs often force "round-trips" to memory for operations like Softmax. By baking FlashAttention logic into the custom ISA, PLENA treats the entire attention mechanism as a single, fused hardware operation.

Key Results

  • Throughput: PLENA delivers 2.24× higher throughput than an NVIDIA A100 GPU and 3.85× higher than a Google TPU v6e when normalized for the same multiplier count and memory settings.
  • Utilization: It achieves up to 8.5× higher utilization of its compute units compared to existing state-of-the-art accelerators like MicroscopiQ or Olive.
  • Efficiency: For the LLaMA-3.3 70B model at 128k context, PLENA's optimizations allow it to fit more batches into memory, significantly reducing the Time To First Token (TTFT) and increasing Tokens Per Second (TPS).

Limitations and Future Work

The authors acknowledge a few areas for growth:

  • Single-Core Focus: The current work focuses on a single-core accelerator design. Future iterations will explore multi-core flattened arrays to further exploit parallelism.
  • Compiler Granularity: While the compiler is functional, the authors suggest it could be enhanced to provide even finer-grained control over execution scheduling.
  • Heterogeneous Integration: A promising future direction is integrating PLENA as a specialized co-processor alongside GPUs, creating a heterogeneous system where the GPU handles standard tasks and PLENA takes over for massive-context agentic reasoning.

The full PLENA system, including the hardware RTL and software stack, is slated to be open-sourced.

Summary updated

BibTeX
@inproceedings{wu2026combating,
  author = {Haoran Wu and Can Xiao and Jiayi Nie and Xuan Guo and Binglei Lou and Jeffrey T. H. Wong and Zhiwen Mo and Cheng Zhang and Przemyslaw Forys and Chengyang Ai and Timi Adeniran and Wayne Luk and Hongxiang Fan and Jianyi Cheng and Timothy M. Jones and Rika Antonova and Robert Mullins and Aaron Zhao},
  title = {{Combating the Memory Walls: Optimization Pathways for Long-Context Agentic Llm Inference}},
  booktitle = {ISCA},
  year = {2026},
  doi = {10.1109/isca66397.2026.00023},
}

Loading related content...

Figure