Prefix-aware admission
Hash exact token prefixes, route toward warm state, and begin asynchronous KV restoration before compute is assigned.
Inference systems · Field note 001
Reverse-engineering how continuous batching, speculative generation, MoE balancing, compressed attention, and tiered KV storage could turn frontier-model inference into an unusually high-margin operation.
Disk-backed KV caching explains why repeated prompts can become cheap. It does not explain cheap output tokens. The missing advantage must live primarily in the decode path.
Reports of extraordinary inference economics tend to provoke a hunt for one hidden optimization. Perhaps the provider streams KV state from NVMe. Perhaps it has a private attention kernel. Perhaps the published model is not the model actually served.
That framing is attractive—and probably wrong. A modern inference service behaves less like a single GPU running a model and more like a factory whose output happens to be tokens. The economic unit is not one request. It is a continuously scheduled fleet, with model architecture, runtime, network, memory hierarchy, and traffic shape designed together.
Core hypothesis: the advantage is multiplicative systems co-design. Massive multi-tenant batching turns weight movement into shared infrastructure; every other optimization exists to keep that factory full.
A local benchmark commonly runs one sequence. Every generated token forces the device to stream much of the active model state from high-bandwidth memory. The operation is memory-bound, utilization is poor, and cost per token looks alarming. A provider with thousands of simultaneous sequences sees a different problem: expert weights can be reused across many tokens, GEMV becomes GEMM, communication can overlap computation, and idle gaps become schedulable inventory.
Prefill, decode, expert routing, and KV persistence have different resource profiles. Treating them as separate but coordinated production stages changes the economics.
Hash exact token prefixes, route toward warm state, and begin asynchronous KV restoration before compute is assigned.
Process cache misses in large chunks on a pool optimized for arithmetic throughput and long prompt sequence parallelism.
Merge live sequences, speculate future tokens, balance hot experts, and overlap dispatch, attention, and expert GEMMs.
These mechanisms are individually familiar. Their production policies—and their interaction with real traffic—are the likely proprietary layer.
With enough concurrent sequences, each expert's weights serve many tokens per load. The scheduler delays work by imperceptible milliseconds to build much more efficient batches while preserving time-to-first-token and inter-token SLOs.
Native multi-token prediction proposes a short future block. The target model verifies it in parallel. Confidence-aware draft length, workload grouping, and early abort policies determine how much theoretical acceptance becomes real throughput.
The slowest expert rank limits every MoE layer. Production traces expose stable code, math, language, and agent hotspots. Replicating popular experts and routing to the least-loaded copy converts parameter sparsity into execution efficiency.
Prefill is compute-heavy; decode is dominated by weight, KV, and network movement. Separate pools can use different parallelism, batch geometry, precision, scaling policy, and even accelerator type without forcing one compromise.
NVMe is best used to restore compressed, reusable KV blocks and skip prefill—not as the synchronous source for every decoding step. Cache admission, promotion, and request routing matter more than the existence of an SSD tier.
FP4 expert weights, FP8 KV, low-precision dispatch, fused RoPE and cache insertion, persistent graphs, and zero-copy RDMA attack the actual decode bottleneck: bytes moved and synchronization gaps, not headline FLOPs.
A prefix cache can turn a 128K repeated prompt into a fast state restore. Every new output token must still pass through the model.
DeepSeek publicly documents exact-prefix context caching on disk. Its 3FS storage system exposes an NVMe-backed distributed layer with RDMA-scale aggregate bandwidth. MLA and newer compressed attention mechanisms reduce the number of bytes associated with each cached token, making persistent KV practical.
But the output side remains expensive unless the decoder also improves. Reasoning traffic makes this distinction impossible to ignore: a cached prompt may be only a small fraction of the total work when the response contains thousands of generated tokens.
Likely architecture: HBM holds active state; DRAM holds warm sessions; NVMe holds reusable prefixes. Restoration is prefetched and overlapped. Synchronous SSD reads on every token would usually surrender the latency advantage.
The open-source simulator runs the same deterministic request trace through a generic baseline and an integrated inference factory. Every lever is visible and independently configurable.
The result is not proof that any provider operates this exact stack. It demonstrates that the reported order of magnitude is reachable without inventing a magical undisclosed accelerator. The combination of utilization, speculation, expert balance, precision, and cache reuse is sufficient under the stated calibration.
The model is deliberately conservative about speculative decoding: only 60% of the theoretical accepted-token improvement becomes throughput. It also charges capex depreciation and energy while excluding staff, storage capex, networking, taxes, and financing. The resulting margin is therefore a hardware-and-energy contribution margin, not a corporate accounting claim.
The architectural ingredients are public. Claims about private production policies remain hypotheses and are labeled accordingly.
The simulator is informed by public technical reports and repositories. It does not ingest leaked data, impersonate production traces, or claim privileged knowledge. Absolute numbers depend on calibration; comparative behavior is the primary object of study.