arXiv:2609.11392cs.ARSep 2026

Manuscript Offprint

arXiv:2609.11392

PATTON: Enabling Commodity PIM for Production LLM Serving

Hangyeol Kim, Sanghyun Lee, Teokkyu Suh, Joo-Young Kim

Abstract

Processing-in-Memory (PIM) is a promising architecture for accelerating memory-bound decode stage attention. However, attention acceleration alone is insufficient for production LLM serving, where serving engines dynamically allocate, populate, share, cache, and reclaim logical KV cache blocks. Supporting this block lifecycle on commodity PIM requires allocating physical memory, mapping logical block IDs and token offsets to exact physical addresses, and generating corresponding command sequences. Block-to-PIM mapping determines GEMV and KV cache write efficiency, while memory allocation granularity determines capacity efficiency. Our observations reveal a fundamental conflict among these three objectives for the Value cache: a GEMV-optimized layout scatters each newly generated Value vector across multiple rows, making decode stage single token Value writes a substantial component of attention latency. Allocating an entire row to each request preserves long GEMV reductions but wastes capacity, whereas fine-grained sharing improves capacity efficiency but fragments those reductions. We present PATTON, a PIM runtime system that integrates production LLM serving engines with commodity PIM. PATTON introduces hierarchical granule allocation: block-sized Key and Value granules map one-to-one to logical token blocks, fixing their physical placements and commands, while coarser granules group them to improve GEMV execution and capacity efficiency. Its Commit Zone stages partial Value blocks for efficient single token writes before committing them to GEMV-optimized locations. PATTON records these placements to generate KV cache writes and commands for QK ⊤^{\top} and SV. Across attention execution and runtime-induced prefill recomputation, PATTON achieves an average 1.95× speedup and 4.83× higher energy efficiency over the evaluated baselines. PATTON requires no modifications to the PIM processing units and maintains a KV cache hit rate comparable to vLLM with its native GPU KV cache.

Sanghyun Lee

lysanghyun@kaist.ac.kr

KAIST

Daejeon, Republic of Korea

Joo-Young Kim

jooyoung1203@kaist.ac.kr

KAIST

Daejeon, Republic of Korea

1 Introduction

Large language models (LLMs) are increasingly deployed through production serving engines such as vLLM, SGLang, and TensorRT-LLM [32, 43, 53]. Unlike standalone inference, these engines continuously process dynamically arriving requests using scheduling techniques such as continuous batching [2, 3, 32, 52]. They also manage the key-value (KV) cache using block-based mechanisms such as PagedAttention, which enables prefix sharing, prefix caching, and efficient dynamic memory management [12, 32]. Together, these techniques create a dynamic serving workflow in which the engine continuously allocates, populates, shares, caches, and reclaims KV cache blocks as requests progress. Therefore, a hardware platform for production LLM serving must efficiently support these KV cache operations in addition to accelerating attention computation.

Meanwhile, attention remains fundamentally memory-bound [10, 11, 14, 28], and its arithmetic intensity increases only marginally as batch size grows [46]. This property has motivated Processing-in-Memory (PIM) [4–6, 8, 9, 13, 15–19, 22, 29, 30, 33, 34, 37, 45, 47, 48], whose high internal memory bandwidth is well suited to memory-bound attention [7, 18, 21, 31, 35, 36, 38–40, 46]. Prior PIM-based LLM systems exploit this advantage through heterogeneous xPU+PIM architectures [20, 21, 31, 36, 39, 40, 46]: the xPU executes compute-bound operations such as feedforward network (FFN) layers, while PIM executes decode stage attention.

However, enabling commodity PIM for production LLM serving requires a PIM runtime that speaks the languages of both the serving engine and PIM—a capability that remains underexplored. Serving engines express KV cache operations using logical blocks, which are software-visible blocks identified by block IDs rather than physical memory addresses. To preserve these semantics, a PIM runtime must allocate physical memory and map each logical block and token offset to an exact channel-bank-row-column address. It must then translate each operation into the corresponding PIM command sequence. Efficiently realizing this translation is challenging because commodity PIM follows a rigid execution model in which computation patterns are constrained by the physical organization of data in memory. The block-to-PIM mapping determines both the DRAM write patterns of newly generated Key and Value vectors and the scheduling of multiply-accumulate (MAC) operations for attention execution. Also, how finely memory is allocated around these mapped blocks determines how efficiently the PIM memory space is utilized.

Existing PIM systems address only parts of this translation problem. Some represent the KV cache as a large tensor and map it to a large PIM memory region at initialization [18, 36, 46], limiting support for dynamic, block-level KV cache management. Systems with finer-grained memory allocation [21, 31, 35, 39] dynamically provision physical memory but do not specify how logical token blocks are physically organized within the allocated space. Other systems optimize DRAM writes and GEMV execution but require significant modifications to the processing units [7, 40]. These limitations collectively leave three key challenges unresolved.

  • The runtime must bridge the gap between the serving engine’s logical block management and PIM’s physical memory organization: The serving engine specifies KV cache writes and attention operations using logical block IDs and token offsets. For a KV cache write, the runtime must translate these into the physical address of the corresponding Key or Value vector. For attention execution, it must identify the physical regions of the blocks participating in Query-Key multiplication (QK ⊤^{\top}) and Score-Value multiplication (SV) and generate their MAC command sequences. Supporting both operations requires an explicit mapping from each logical block and token offset to its channel-bank-row-column placement in PIM.

  • Block-to-PIM mapping and memory allocation must jointly account for Key and Value characteristics, GEMV efficiency, KV cache write efficiency, and capacity efficiency: QK⊤QK^{\top} reduces over the fixed head dimension, whereas SV reduces over the growing token dimension, requiring different physical block compositions for Key and Value. GEMV efficiency favors long contiguous reductions executed in parallel across channels, while KV cache write efficiency favors high burst utilization and few row activations. Memory allocation must be fine-grained enough to use PIM capacity efficiently, thereby retaining useful cached prefixes and preserving the KV cache hit rate. The runtime must therefore coordinate block-to-PIM mapping with memory allocation to satisfy all three efficiency objectives.

  • This joint objective exposes a fundamental conflict in Value layout: A GEMV-optimized Value layout places

Figure

OpE/B: Operand from external/bank | WR_GB: Write to global buffer | WR_BIAS: Initialize result register MAC_AB: MAC across all banks | RD_MAC: Read result register | Ext.: External

Figure 1. Commodity PIM architecture and the mapping of a GEMV operation to PIM.

Figure

(a)

(b)

Figure 2. (a) Block-level KV cache management and prefix sharing. (b) Prefix caching in multi-turn conversation scenarios.

consecutive tokens along the columns of each row to accumulate them in one continuous reduction. However, the same layout scatters a newly generated token's Value vector across multiple rows, causing poorly utilized row activations and substantial write latency. Allocating an entire row to each request preserves GEMV efficiency but wastes capacity, potentially forcing the eviction of useful cached prefixes. Naively allowing multiple requests to share a row recovers that capacity but can fragment each request's reduction. The runtime must therefore handle Value placement with particular care.

To address these challenges, we propose PATTON, a runtime system for production LLM serving on commodity PIM architectures. PATTON performs block-to-PIM translation through hierarchical granule allocation and a Commit Zone. Hierarchical granule allocation composes minimum valid parallel PIM execution granules into block-sized Key and Value granules, each mapped one-to-one to a logical token block to fix its placement and commands. Coarser granules group these block mappings across channels, rows, and columns to exploit channel parallelism, optimize GEMV execution, and use PIM capacity efficiently. For Value, this grouping keeps several neighboring block locations available to one request so that SV retains a useful continuous reduction, while allowing other requests to use the remaining row capacity. The Commit Zone temporarily stores the Value block currently being filled in a layout optimized for decode stage single token writes. After all token positions have been written, PATTON commits the block to its reserved GEMV-optimized location. PATTON records these bindings to translate logical block IDs and token offsets into KV cache DRAM writes and command sequences for QK ⊤^{\top} and SV.

We implement PATTON in vLLM, a representative production serving engine, and target the AiM architecture, whose instruction set is publicly available [30]. Across attention execution and runtime-induced prefill recomputation, PATTON achieves an average 1.95×1.95\times speedup and 4.83×4.83\times higher energy efficiency over the evaluated baselines without modifying the underlying PIM architecture.