cs.LGOct 10, 2026

Accelerating Cross-Model LLM Inference via Attention Map Reuse

Authors: Zhan Jin, Yuze Luo, Bin Cui, Xupeng Miao

Organizations: School of Computer Science & Beijing Key Laboratory of Software and Hardware Cooperative Artificial Intelligence Systems, Peking University · Key Lab of High Confidence Software Technologies (MOE), Peking University

Abstract

LLM-augmented data workflows often involve multiple heterogeneous models operating over substantial shared context, such as schemas, tool specifications, interaction history, and intermediate results. Although prefix caching can reduce prefilling overhead, existing approaches are largely limited to reuse within the same model because KV states are tightly coupled to model-specific architectures. We present MapFlow, a system for efficient heterogeneous LLM serving via cross-model attention map reuse. Instead of reusing KV states, MapFlow reuses attention maps, which capture token dependency patterns and are more transferable across models. To enable efficient and accurate reuse, we combine partial recomputation with lightweight linear translation across layers and heads. To make attention reuse practical for long contexts, we further introduce block-level sparse compression and a fused retrieval kernel. Experiments show that MapFlow reduces prefilling latency and improves end-to-end serving efficiency while preserving generation quality across heterogeneous model pairs and multi-turn routing workloads. These results suggest that attention maps provide an effective reusable state for heterogeneous LLM serving, especially in prefix-heavy data workflows. Our code is available: https://github.com/PKU-DAIR/MapFlow.

Figures & tables

Explore similar work

CardsList
  1. A Universal Context-Reuse Layer for Cross-Model KV Sharing

    Aug 31, 2026Yi Li, Dongming Jiang, Yi Zhao +1LLM InferenceKV Caching