Thursday, December 3, 2026 | London 10°C · Drizzle
DailyGlimpse

AI

Splitting LLM Inference Across Two GPUs: A Practical Experiment

Onchain AI Garage 2 min read

A developer has demonstrated how to split large language model (LLM) inference across two separate GPUs, replicating a technique described in a recent paper from Kimi. The approach separates the prefill and decode phases of inference, leveraging the key-value (KV) cache to minimize data transfer overhead.

In standard LLM inference, the prefill stage processes the input prompt in parallel and is compute-bound, while the decode stage generates tokens one by one and is memory-bandwidth-bound. By running prefill on one GPU and decode on another, the two phases can be optimized independently. The key challenge is transferring the KV cache, which stores attention state, between GPUs without causing bottlenecks. Kimi's paper introduces a hybrid attention mechanism that makes this split feasible, allowing the KV cache to be transferred efficiently.

The experimenter tested this setup using a PC and a laptop, connected over a network. The results validated the paper's predictions, showing that the split can reduce latency and improve resource utilization, especially when the two GPUs have different capabilities. The approach could lead to cost savings by allowing users to pair a powerful GPU for prefill with a less expensive one for decode.

For those interested in the technical details, the video covers the prefill versus decode trade-off, the role of the KV cache, and the hybrid attention design that enables the split. The experiment also includes byte-for-byte verification of the KV cache to ensure correctness.

React