Disaggregated LLM Inference: Prefill-Decode, NVFP4, and GB200 NVL72
>Explore the production architecture of disaggregated LLM serving: prefill/decode separation, NVFP4 KV cache compression, and high-speed NIXL interconnects on GB200 NVL72 clusters.
🎧 Listen — ~10 min
Audio summary not available yet
Disaggregated inference architecture separates the compute-bound prefill phase of large language model serving from the memory-bandwidth-bound decode phase across specialized GPU worker pools. By pairing disaggregated prefill and decode (PD separation) with 4-bit floating-point (NVFP4) Key-Value (KV) cache compression and high-throughput transfer protocols like NIXL on NVIDIA GB200 NVL72 hardware, infrastructure teams can eliminate head-of-line blocking, quadruple KV cache context density, and dramatically increase tokens per provisioned megawatt.
Key takeaways
- Eliminate phase interference: Prefill tasks require massive matrix multiplication (GEMM) throughput, while decode tasks require sequential memory bandwidth (GEMV). Co-locating them on the same GPU forces low batch sizes or starves decode iterations.
- Compress KV state by 75%: Shifting KV caches from standard 16-bit precision to NVFP4 shrinks memory consumption by 4x, drastically cutting network transfer payloads between prefill and decode nodes.
- Interconnect is the linchpin: Moving intermediate KV caches between disaggregated prefill and decode workers demands low-latency, high-bandwidth interconnects like rack-scale NVLink or specialized NIXL routines to avoid network-bound Time-To-First-Token (TTFT) degradation.
- Economics dictate metrics: Modern serving optimization requires balancing raw tokens per second with total cost of ownership, tracking metrics formalized by benchmarking suites such as InferBench and SemiAnalysis's InferenceMAX, specifically performance-per-dollar and tokens per provisioned megawatt.
2. Core Architecture of Disaggregated Serving
To overcome monolithic contention, modern infrastructure architectures like Prime Intellect's Prime Inference disaggregate the serving pipeline into specialized physical pools.
The Request Lifecycle
- Ingress and Routing: An intelligent gateway inspects incoming context size, service-level objectives (SLOs), and cache hits.
- Prefill Execution: The request routes to a prefill worker running at high tensor parallelism or optimized FP4/FP8 compute kernels, generating output logits for the first token while accumulating the initial KV cache.
- Inter-Node Transfer: Rather than retaining the sequence, the prefill worker flushes the KV cache across a dedicated RDMA/NVLink fabric to an assigned decode worker.
- Decode Execution: The decode node absorbs the KV tensors into its local HBM pool and proceeds with auto-regressive decoding using continuous batching, streaming generated tokens back to the caller.
3. KV Cache Compression: Scaling with NVFP4
The largest technical obstacle in disaggregated serving is the physical size of the KV cache. For a 70B+ or frontier MoE model, uncompressed FP16 KV cache consumes hundreds of gigabytes across concurrent requests:
$$\text{KV Cache Size per Token} = 2 \times n_{\text{layers}} \times d_{\text{head}} \times n_{\text{heads}} \times \text{bytes per element}$$
At FP16 precision (2 bytes), an incoming prompt of 128,000 tokens on a model with 64 layers and 8 KV heads ($d_{\text{head}}=128$) generates roughly 26.8 GB of KV cache data for a single request. Moving this payload across network boundaries introduces unviable latency spikes.
The NVFP4 Compression Mechanism
To make KV transfer feasible at scale, production stacks deploy NVFP4 (NVIDIA 4-bit floating point) quantization. NVFP4 uses a micro-exponent and mantissa representation (typically E2M1) coupled with fine-grained scaling factors.
1FP16 KV Cache (16 bits/element)
2[SEEEEEFFFFFFFFFF] -> 100% Memory & Transfer Baseline
3
4FP8 KV Cache (8 bits/element)
5[SEEEMMFF] -> 50% Footprint Reduction
6
7NVFP4 KV Cache (4 bits/element + Block Scaling)
8[EMMF] + Shared Scale Factor per 16/32 elements -> 75% Footprint Reduction- Footprint Reduction: Reduces the KV payload from 2 bytes to 0.5 bytes per element, delivering an immediate 75% reduction in HBM usage and network transfer volume.
- Accuracy Retention: Unlike uniform integer quantization (INT4), the logarithmic dynamic range of NVFP4 retains the distribution outliers characteristic of self-attention key projections.
- Throughput Multipliers: By shrinking the KV cache memory boundary, decode nodes can fit 3x to 4x higher concurrent batch sizes within the same VRAM capacity before paging kicks in.
Teams rolling out aggressive quantization must pair these pipelines with rigorous evaluation harnesses, as outlined in our guide on continuous AI evaluation architecture.
4. Network Interconnects and NIXL KV Transfer Mechanics
Disaggregation succeeds or fails entirely on the throughput of the interconnect connecting prefill and decode pools. If transferring the KV cache takes longer than executing the prefill computation, the disaggregated pipeline yields worse TTFT than a monolithic setup.
+-------------------------------------------------------------------------+ | NIXL Interconnect Data Pipeline | +-------------------------------------------------------------------------+ | Prefill Worker VRAM (NVFP4 Quantized KV Tensors) | | | | | v | | [Zero-Copy GPU Buffer Pointer] | | | | | +---> [NIXL Transfer Layer: Direct Memory Registration] | | | | | v | | GB200 NVL72 NVLink Fabric (1.8 TB/s bidirectional / GPU) | | or RoCEv2 800Gbps RDMA Network | | | | | v | | Decode Worker VRAM (Direct Target Allocation via PagedAttention) | +-------------------------------------------------------------------------+
Addressing the Interconnect with NIXL
To eliminate host CPU overhead, memory copies, and socket bottlenecks, production deployments leverage high-speed communication layers such as NIXL (Network Interface for Accelerated Cross-Node Linkages) and rack-scale NVLink switches:
- Zero-Copy Remote Direct Memory Access (RDMA): NIXL uses kernel-bypass GPUDirect RDMA. The prefill engine writes KV cache tensors directly into the memory space of the destination decode engine's GPU without staging in host RAM.
- Asynchronous Prefetching: The transfer pipeline pushes KV blocks incrementally. As earlier attention layers complete their prefill phase, their corresponding KV blocks begin streaming to the decode node while subsequent layers are still computing.
- Rack-Scale NVLink Fabric: Deployments on systems like the NVIDIA GB200 NVL72 unify up to 72 GPUs under a single NVLink domain offering 1.8 TB/s bidirectional bandwidth per GPU. Over this fabric, inter-node KV transfer latency approaches intra-node PCIe bandwidth, rendering network transfer overhead negligible.
5. Serving Economics: Benchmarks and Hardware Trade-Offs
Choosing an inference architecture requires analyzing hardware utilization, latency profiles, and energy consumption. Public benchmarking platforms such as InferBench systematically measure throughput, TTFT, and serving economics across diverse GPU clusters.
Meanwhile, SemiAnalysis’s InferenceMAX index evaluates operational trade-offs across accelerators (including the NVIDIA GB200 NVL72 and AMD Instinct MI355X), standardizing key cost and throughput metrics:
- Tokens per Second per GPU ($Tok/s/GPU$): Effective throughput per hardware unit.
- Latency ($Tok/s/User$): Interactivity rate delivered to individual concurrent users.
- Tokens per Provisioned Megawatt ($Tok/MW$): The primary constraint for hyperscale data centers facing power delivery limits.
The following table contrasts monolithic serving with disaggregated configurations:
| Parameter / Metric | Monolithic FP16 Baseline | Disaggregated FP8 Serving | Disaggregated NVFP4 on GB200 NVL72 |
|---|---|---|---|
| Prefill / Decode Separation | No (Co-located) | Yes (Separated Pools) | Yes (Hardware Specialized) |
| KV Cache Precision | 16-bit (FP16/BF16) | 8-bit (FP8) | 4-bit (NVFP4) |
| Max Batch Size (128k Context) | 1x Baseline | ~2.2x Baseline | ~4.1x Baseline |
| TTFT P95 Overhead | High (Head-of-line stalls) | Low (Isolated Prefill) | Near-Zero (NVLink Prefetching) |
| Network Fabric Requirement | Standard Ethernet (RoCE) | 400Gbps RDMA InfiniBand | NVLink Switch (1.8 TB/s) / NIXL |
| Power Efficiency ($Tok/MW$) | 1.0x Baseline | 1.8x Baseline | 3.4x Baseline |
| Relative Cost per 1M Tokens | High ($$$$) | Moderate ($$) | Low ($) |
Analysis Note: While disaggregated architectures lower marginal cost per token during sustained workloads, they require higher orchestration complexity. If incoming traffic drops below minimum utilization thresholds, idling decode workers degrade overall cost-efficiency compared to dynamic autoscaling monolithic setups. Planning cluster investments around these dynamics requires rigorous modeling, as explored in our study on AI infrastructure capex and compute planning.
6. Implementation Blueprint: Disaggregated Worker Configuration
The following minimal implementation demonstrates an architectural pattern for disaggregated worker nodes using an abstract asynchronous serving client with quantized KV transfer hooks.
1"""
2Disaggregated Inference Orchestrator Hook
3Illustrates prefill execution, NVFP4 KV extraction, and zero-copy dispatch.
4"""
5
6from dataclasses import dataclass
7import numpy as np
8
9@dataclass
10class ServingRequest:
11 request_id: str
12 prompt_tokens: list[int]
13 max_decode_tokens: int
14
15@dataclass
16class QuantizedKVCache:
17 quantized_tensor_ptr: int
18 scale_factor_ptr: int
19 seq_len: int
20 precision: str = "NVFP4"
21
22class PrefillWorker:
23 def __init__(self, device_id: int):
24 self.device_id = device_id
25
26 async def compute_prefill(self, req: ServingRequest) -> tuple[int, QuantizedKVCache]:
27 first_token_id = 42 # Generated first token
28 kv_meta = QuantizedKVCache(
29 quantized_tensor_ptr=0x7F20B000,
30 scale_factor_ptr=0x7F20C000,
31 seq_len=len(req.prompt_tokens),
32 precision="NVFP4"
33 )
34 return first_token_id, kv_meta
35
36class NIXLTransferBridge:
37 def __init__(self, fabric_endpoint: str):
38 self.endpoint = fabric_endpoint
39
40 async def dispatch_kv_cache(self, kv: QuantizedKVCache, target_decode_gpu: int) -> bool:
41 """
42 Executes GPUDirect zero-copy memory transfer via NIXL / NVLink.
43 """
44 payload_bytes = (kv.seq_len * 64 * 8 * 128 * 0.5) # Approximate NVFP4 footprint
45 transfer_success = True
46 return transfer_success
47
48class DecodeWorker:
49 def __init__(self, device_id: int):
50 self.device_id = device_id
51 self.active_batches = {}
52
53 async def register_and_decode(self, req_id: str, first_token: int, kv: QuantizedKVCache):
54 self.active_batches[req_id] = {
55 "current_token": first_token,
56 "kv_cache_ref": kv.quantized_tensor_ptr
57 }
58 return f"Streaming initialized for request {req_id}"Router Coordination Sequence
1async def handle_inference_lifecycle(request: ServingRequest):
2 prefill_node = PrefillWorker(device_id=0)
3 decode_node = DecodeWorker(device_id=1)
4 bridge = NIXLTransferBridge(fabric_endpoint="nvlink-domain-0")
5 first_token, compressed_kv = await prefill_node.compute_prefill(request)
6 await bridge.dispatch_kv_cache(compressed_kv, target_decode_gpu=decode_node.device_id)
7 status = await decode_node.register_and_decode(
8 req_id=request.request_id,
9 first_token=first_token,
10 kv=compressed_kv
11 )
12 return status7. Operational Failure Modes and Mitigation Strategies
Deploying disaggregated serving in production introduces unique distributed systems challenges:
1. KV Transfer Stragglers
- Failure Mode: Network congestion on standard RoCEv2/InfiniBand fabrics causes variable packet delivery times, delaying decode handoff and degrading TTFT tail percentiles (P99).
- Mitigation: Enforce strict Quality of Service (QoS) bandwidth reservations for KV communication channels, or standardize on unified chassis topologies such as the GB200 NVL72 where NVLink switches guarantee uniform bi-directional bandwidth.
2. Attention Accuracy Loss on Ultra-Long Contexts
- Failure Mode: NVFP4 block quantization can lose numerical precision in needle-in-a-haystack tasks or complex multi-turn reasoning when attention distributions feature extreme outlier values.
- Mitigation: Implement mixed-precision KV caching. Maintain FP8 or FP16 precision on the first 10% of critical anchor/sink layers while applying NVFP4 to intermediate layers. Track model drift using modern prompt engineering and output validation harnesses.
3. Asymmetric Queue Imbalances
- Failure Mode: A sudden influx of short-context, high-decode requests starves the decode pool while prefill workers sit idle (or vice versa for document indexing workloads).
- Mitigation: Deploy elastic pool reallocation. Use virtual scheduling agents capable of switching worker role assignments (Prefill $\leftrightarrow$ Decode) dynamically when queue thresholds breach SLO boundaries.
8. Production Verification Checklist
Before migrating frontier open models from monolithic inference to a disaggregated NVFP4 architecture, complete this readiness checklist:
- Interconnect Latency Validation: Confirm RDMA / NVLink bidirectional transfer speeds exceed 400 Gbps (or 900 GB/s on NVLink) using synthetic point-to-point bandwidth tests.
- Quantization Fidelity Audit: Verify perplexity score delta remains under 0.05 points on validation sets between native FP16 and NVFP4 compressed models.
- Transfer-Compute Overlap: Inspect CUDA traces to verify that asynchronous NIXL KV transfers execute concurrently with final-layer prefill operations.
- SLO Monitoring: Ensure monitoring agents separately record:
- Time to First Token (TTFT)
- Time per Output Token (TPOT)
- Inter-node KV transfer latency (ms/req)
- KV Cache Eviction / Paging Events
- Power Envelope Compliance: Benchmark tokens per provisioned megawatt under full load against InferBench baselines to verify hardware power caps are not violated.
Practical Engineering Verdict
Disaggregated prefill-decode architectures represent a permanent design shift for serving frontier models exceeding 100 billion parameters. Monolithic serving remains suitable for smaller models (e.g., 7B to 14B) where the overhead of network-coordinated KV transfer exceeds the benefits of compute-decode separation.
However, for enterprise clusters handling mixed workloads with 32k+ context lengths, combining disaggregated routing, NVFP4 KV cache compression, and high-bandwidth interconnects (such as NIXL on GB200 NVL72) delivers lower latency variance, quadruples concurrent batch capacity, and optimizes tokens generated per provisioned megawatt.
Frequently asked questions
What is the core difference between prefill and decode stages in LLM serving?
Prefill processes the entire input prompt at once, creating high computational demand (compute-bound) suitable for massive parallelization on GPU Tensor Cores. Decode generates tokens sequentially one by one, requiring continuous reloading of weights and KV caches from memory (memory-bandwidth bound), which severely limits compute efficiency.
How does NVFP4 KV cache compression preserve model output quality?
Unlike basic 4-bit integer quantization (INT4), NVFP4 uses a floating-point format (typically 1 sign bit, 2 exponent bits, and 1 mantissa bit) combined with micro-block scaling factors. This structure preserves dynamic range and better captures the statistical outliers common in multi-head attention projections.
Can disaggregated inference run over standard 100GbE data center networking?
While technically possible, running disaggregated prefill-decode over standard 100Gbps Ethernet typically creates transfer latency bottlenecks that negate the advantages of PD separation. Disaggregated pipelines generally require at least 400Gbps/800Gbps RDMA InfiniBand/RoCEv2 or specialized rack-scale fabrics like NVLink.
When should teams stick to monolithic inference instead of disaggregating?
Monolithic serving is preferable when hosting small models (<30B parameters), handling predominantly short prompts (<1,000 tokens), or operating on single-node GPU workstations where network-based KV cache transfers are not applicable.
Sources and image references
- Cysic InferBench: InferBench Open Model Inference Benchmarks – Hardware-level benchmarking platform measuring throughput, latency, energy, and serving economics.
- SemiAnalysis: InferenceMAX™: Open Source Inference Benchmarking – Methodology and performance comparisons across GB200 NVL72, AMD MI355X, and frontier open-source architectures.
- Prime Intellect: Prime Inference: Fast, Reliable Serving for Frontier Open Models – Technical documentation on production prefill/decode separation, NVFP4 KV compression, and NIXL data pipelines.
Keep reading
Related reading
⚡ AI Engineering Briefing
AI model releases, practical tutorials, developer tools, and engineering research. Unsubscribe anytime.
Comments
Comments are temporarily unavailable while the public discussion space is being configured.