Layer-first Prefix KV Cache Loading for Low-latency Inference on Huawei CloudMatrix

KV cache management is critical for efficient LLM serving, enabling computational reduction and request-level reuse in autoregressive decoding. However, as context lengths and model sizes increase, host-to-device KV cache transfer has emerged as a latency-critical bottleneck. Conventional systems adopt token-first layout optimized for bulk RDMA transfers in scale-out networks, requiring all layers to arrive before inference can begin, substantially increasing time-to-first-token (TTFT). We address this limitation by exploiting the high-bandwidth UnifiedBus (UB) interconnects available in scale-up architectures like Huawei CloudMatrix384. We propose two key methods: redesigning KV cache into a layer-first layout to enable independent fetching of each layer, and replacing bulk SDMA transfers with fine-grained AIV load/store operations, which provide significantly lower latency for small transfers. This design enables efficient prefetching of early-layer KV data while overlapping subsequent layer transfers with computation. Evaluated on an 8-NPU CloudMatrix instance serving Qwen3-32B with a 6,912-token prefix, our approach reduces P50 warm-start TTFT by 11.4\% compared to conventional bulk SDMA, demonstrating the effectiveness of co-designing cache layouts and transfer mechanisms for scale-up LLM serving architectures.

Authors

Publication Details

Journal
arXiv
Published
2026-12-03
Primary Topic
Parallel Computing and Optimization Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Layer-first Prefix KV Cache Loading for Low-latency Inference on Huawei CloudMatrix

Ruozhuo Gan, Yuedong Xu
arXiv
Parallel Computing and Optimization Techniques
preprint

Layer-first Prefix KV Cache Loading for Low-latency Inference on Huawei CloudMatrix

Ruozhuo Gan, Yuedong Xu
preprint en

Abstract

KV cache management is critical for efficient LLM serving, enabling computational reduction and request-level reuse in autoregressive decoding. However, as context lengths and model sizes increase, host-to-device KV cache transfer has emerged as a latency-critical bottleneck. Conventional systems adopt token-first layout optimized for bulk RDMA transfers in scale-out networks, requiring all layers to arrive before inference can begin, substantially increasing time-to-first-token (TTFT). We address this limitation by exploiting the high-bandwidth UnifiedBus (UB) interconnects available in scale-up architectures like Huawei CloudMatrix384. We propose two key methods: redesigning KV cache into a layer-first layout to enable independent fetching of each layer, and replacing bulk SDMA transfers with fine-grained AIV load/store operations, which provide significantly lower latency for small transfers. This design enables efficient prefetching of early-layer KV data while overlapping subsequent layer transfers with computation. Evaluated on an 8-NPU CloudMatrix instance serving Qwen3-32B with a 6,912-token prefix, our approach reduces P50 warm-start TTFT by 11.4\% compared to conventional bulk SDMA, demonstrating the effectiveness of co-designing cache layouts and transfer mechanisms for scale-up LLM serving architectures.

arXiv
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon