Scalable Processing-Near-Memory for 1M-Token LLM Inference: CXL-Enabled KV-Cache Management Beyond GPU Limits

Dowon Kim, MinJae Lee, Janghyeon Kim, Hyucksung Kwon, Hyeonggyu Jeong, Sang-Soo Park, Minyong Yoon, Si-Dong Roh, Yongsuk Kwon, Jinin So, Jungwook Choi

Abstract

As Large Language Models (LLMs) evolve to support multi-million token context windows, the memory requirements for Key-Value (KV) caches have surpassed the physical capacities of high-bandwidth memory (HBM) in modern GPUs. Traditional offloading to system memory introduces significant latency and bandwidth bottlenecks. This paper presents a scalable Processing-Near-Memory (PNM) architecture utilizing Compute Express Link (CXL) to manage KV caches for contexts up to 1 million tokens. By offloading attention calculations to specialized Vector Processing Units (VPUs) within CXL memory modules, the proposed system achieves up to 21.9× higher throughput and 60× lower energy consumption compared to conventional GPU-only offloading strategies.

1. Introduction: The Memory Wall in Long-Context Inference

The transition toward long-context LLMs, such as Llama 3.1 and Gemini 1.5, has fundamentally shifted the bottleneck of inference from computation to memory capacity. The Key-Value (KV) cache, essential for avoiding redundant computations during token generation, grows linearly with sequence length. For a 1-million-token context, the KV cache size can exceed 80GB, surpassing the capacity of a single NVIDIA A100 or H100 GPU.

Existing solutions typically involve offloading the KV cache to CPU RAM or CXL-attached memory. However, these approaches face two critical challenges:

  1. Recall Overhead: The GPU must constantly fetch relevant KV pairs from external memory over the relatively narrow CXL/PCIe link to compute attention, leading to severe bandwidth saturation.
  2. GPU Underutilization: The massive memory footprint of long contexts forces smaller batch sizes, leaving the GPU’s tensor cores idle during the execution of fully connected (FC) layers.

2. The PNM-KV Architecture

To address these bottlenecks, we propose PNM-KV, a system that moves the computation to the data rather than moving the data to the computation. The architecture is built around a custom CXL Type 3 memory device integrated with a Vector Processing Unit (VPU).

2.1 Vector Processing Units (VPU)

Instead of acting as passive storage, the CXL memory module performs active computation. The VPU handles token page selection, score estimation, and attention calculations directly within the memory module. This eliminates the need to transfer massive amounts of KV data back to the GPU, effectively bypassing the CXL link's bandwidth limitations.

2.2 Decoupled Parallelism

Standard LLM inference relies on Tensor Parallelism (TP) for weight-heavy layers. However, TP is inefficient for searching through a disaggregated KV cache across multiple devices. PNM-KV introduces a hybrid parallelism strategy: while the GPU continues to use TP for model weights, the PNM cluster utilizes Data Parallelism (DP) for attention. This allows each CXL memory module to operate independently, ensuring the system scales linearly as more memory modules are added.

3. Hybrid Execution and Steady-Token Selection

The system operates in a hybrid mode called PnG-KV, where the GPU and PNM modules share the workload. A key innovation in this execution model is the Steady-Token Selection algorithm.

Research indicates that certain tokens exhibit "temporal locality," remaining persistently relevant across multiple generation steps. The PnG-KV scheduler identifies these "steady" tokens and maintains them in the GPU's high-speed HBM. The bulk of the remaining context is managed by the PNM modules. This strategy ensures that the most critical data is accessed with the lowest possible latency while the high-capacity CXL memory handles the long-tail context.

4. Evaluation

The architecture was evaluated using the Llama 3.1 model family (8B, 70B, and 405B parameters) with context lengths ranging from 128K to 1 million tokens. Performance was measured using a cycle-level simulator based on 7nm ASIC design parameters and verified against benchmarks like LongBench and InfiniteBench.

4.1 Performance and Efficiency

  • Throughput: The PNM-KV system demonstrated up to a 21.9× improvement in throughput for 1M-token contexts compared to baseline GPU offloading.
  • Energy Consumption: By utilizing low-power LPDDR5X memory and minimizing high-power data movement across PCIe/CXL links, the system achieved 60× lower energy per token.
  • Total Cost of Ownership (TCO): The architecture provides a 7.3× better TCO efficiency, suggesting that CXL-PNM modules are a more cost-effective scaling path than increasing GPU counts solely for memory capacity.

5. Conclusion

PNM-KV represents a significant step toward making multi-million token inference commercially and technically viable. By transforming CXL memory from a passive storage tier into an active compute participant, the architecture overcomes the traditional "memory wall." Future work will focus on optimizing peer-to-peer communication between CXL devices and integrating the PNM software stack into standard deep learning frameworks like PyTorch and vLLM.

Summary updated

BibTeX
@inproceedings{kim2025scalable,
  author = {Dowon Kim and MinJae Lee and Janghyeon Kim and Hyucksung Kwon and Hyeonggyu Jeong and Sang-Soo Park and Minyong Yoon and Si-Dong Roh and Yongsuk Kwon and Jinin So and Jungwook Choi},
  title = {{Scalable Processing-Near-Memory for 1M-Token LLM Inference: CXL-Enabled KV-Cache Management Beyond GPU Limits}},
  booktitle = {PACT},
  year = {2025},
  doi = {10.1109/pact65351.2025.00013},
}
Figure