KV Cache Broadcast Communication Optimization for LLM Inference
This article explains how KV cache broadcast can reduce communication overhead in large-model inference, especially for long-context and multimodal workloads. It covers KV communication patterns, intra-node broadcast design, quantized cache formats, layer and stage decoupling, an engineering checklist, and how to evaluate performance without relying on throughput alone.
Why KV Communication Becomes an Inference Bottleneck
Large-model inference is not only about matrix multiplication. When the context grows to hundreds of thousands or even millions of tokens, or when the input contains images, video, and text at the same time, the Key/Value (KV) cache produced by the attention mechanism can quickly fill the memory of a single accelerator. Under tensor parallelism, pipeline parallelism, and cross-request reuse, the same cache may be moved repeatedly across chips and nodes.
If interconnect bandwidth cannot keep up with computation, prefill latency becomes unstable, and per-token decode latency can also be dragged down by communication.
KV broadcast targets scenarios where one cache is written once but read by multiple parties. Instead of having every compute shard pull the full KV cache, the side holding the authoritative copy distributes it once according to the topology, and the other shards receive only the slices they need. It is not a new attention algorithm. It is a coordinated optimization of cache lifecycle and communication graph.
KV Cache Data Layout and Communication Patterns
KV tensors are usually organized by layer, sequence position, and attention head. With tensor parallelism, heads are split across devices. With sequence parallelism or context parallelism, the time dimension is split. Multimodal encoding can also append visual tokens beyond text tokens, causing abrupt changes in sequence length.
These partitioning schemes lead to three main communication patterns:
- Reduction-type communication: Intermediate results require AllReduce or ReduceScatter.
- Gather-type communication: A stage needs to reassemble the full sequence or the full set of heads.
- Broadcast-type communication: A written KV cache is consumed by multiple later stages, multiple decode workers, or multiple cards on the same node.
If broadcast traffic is implemented as multiple point-to-point copies, bandwidth consumption is multiplied by the number of consumers. If it is implemented as tree-based or ring-based broadcast and overlapped with the compute pipeline, effective bandwidth can approach “write once, read many times.”
In practice, the first step is to map out who writes the KV cache, who reads it, and whether the reads cross nodes. Only then should the broadcast root and slice granularity be chosen.
Combining Intra-Node Parallelism with Broadcast
Inside a node, tensor parallelism is commonly used first: the attention heads of the same layer are placed on multiple accelerators. If the KV cache is split by head, broadcast can degrade to sending only metadata and unsplit parts that are shared across heads for the current layer and request. The large K/V blocks can remain in local HBM.
If the parallelism degree causes the head count not to divide evenly, or if GQA/MQA makes the number of K/V heads much smaller than the number of Q heads, there are fewer K/V replicas. In that case, the KV cache is more suitable as a broadcast source: the small number of devices holding K/V distribute it to the devices holding Q, avoiding the need for every Q-side card to assemble data from remote sources.
Recommended practices:
- Fix the broadcast root and align slices to page size or block size to reduce fragmented copies.
- Overlap broadcast with the subsequent matrix multiplication pipeline, using double buffering to hide latency.
- For read-only KV data, use read-only mappings or zero-copy descriptors to avoid unnecessary materialization.
Reducing Broadcast Volume with Quantization and Mixed-Precision Caches
The first lever for communication optimization is still data volume. A common approach is to use higher precision for computation and lower bit-width for caching. For example, activations and weights may use integer or low-bit floating-point formats, while the KV cache uses INT8, FP8, or BF16 stored in a mixed manner by layer or channel.
What gets broadcast should be the quantized blocks. Dequantization should be performed on the consumer side and fused with the compute kernel where possible, avoiding the pattern of “restore to BF16 first, then transfer.”
Calibration and error accumulation also matter. In long-context scenarios, the KV cache of early tokens is read repeatedly, and quantization error can accumulate during decoding. A common layered strategy is to keep higher bit-width for shallow layers or layers that are more sensitive to numerical error, while compressing deeper layers more aggressively.
Mixed-precision cache quantization must use the same dtype and scale layout as the broadcast protocol. Otherwise, the receiving side cannot correctly dequantize the data.
Layer Partitioning and Stage Decoupling
Optimizing a single broadcast is not enough. Long-context workloads often split the model by layer, placing different layers on different device groups to form an inter-layer pipeline. In this setup, the KV cache lifecycle spans stages: encoding produces visual or text representations, prefill writes the full KV cache, and decode appends new KV step by step.
Making encoding, prefill, and decode independently scalable worker pools is essentially about allowing the stage that writes the KV cache and the stage that repeatedly reads it to use different parallelism degrees and hardware ratios.
Under this decomposition, KV broadcast appears at two boundaries:
- After prefill completes, the read-only prefix is distributed to the decode pool.
- During decoding, newly generated KV is synchronized to peer shards.
Prefixes are suitable for large, low-frequency broadcasts. Incremental KV is suitable for small, high-frequency, mergeable bursts. The scheduler should avoid moving hot KV back and forth between nodes and should keep decode tasks affine to nodes that already hold the prefix.
Engineering Checklist
- Metrics: Measure KV byte traffic for prefill and decode separately, broadcast completion time, and compute-communication overlap rate. Do not rely only on end-to-end QPS.
- Topology: Prefer intra-node broadcast. For cross-node communication, use a hierarchical tree and avoid full connectivity.
- Consistency: Assign version numbers to KV blocks to prevent decode from reading partial data before prefill completes.
- Fault tolerance: If broadcast fails, fall back to on-demand pulling, but treat the fallback as an exception path. Otherwise, it can hide topology problems.
- Security and isolation: In multi-tenant environments, broadcast domains must be isolated per request. Sharing underlying buffers across sessions is not allowed.
How to Evaluate the Benefits
A reasonable expectation is that, under the dual constraints of memory and bandwidth, long-sequence and multimodal workloads can benefit from reduced duplicate KV transfer, higher device utilization, and smoother tail latency.
The actual gain depends on model width, parallelism degree, quantization bit-width, and cluster topology. Promotional numbers from a particular internal stack should not be treated as universal conclusions.
When evaluating, fix the model and precision, then compare “multiple point-to-point pulls” with “topology-aware broadcast plus quantized cache.” Report both hardware occupancy and per-token cost, rather than throughput alone.
Summary
KV broadcast changes “one cache, many consumers” from repeated copying into topology-aware distribution. It works together with tensor parallelism, cache quantization, layer partitioning, and the decoupling of encoding, prefill, and decode.
It addresses the interconnect and memory wall, not model accuracy itself. When the communication graph, dtype layout, and scheduling affinity are designed clearly, long-context and multimodal inference can maintain stable latency and cost on general-purpose accelerator clusters.
