Theoretically Optimal Attention/FFN Ratios in Disaggregated LLM Serving
Chendong Song, Meixuan Wang, Hang Zhou, Hong Liang, Yuan Lyu, Zixi Chen, Yuwei Fan, Zijie Zhou
TL;DR
This work addresses efficient inference for disaggregated LLM serving by rigorously sizing the Attention/FFN ratio in an $r$A–$1$F architecture. It develops a probabilistic workload model with continuous batching, derives a horizon-average token load, and yields a closed-form $r^*$ that delineates three operating regimes (Attention-, Communication-, and FFN-bottleneck). A trace-calibrated simulator validates the theory, showing the predicted $r^*$ closely matches the simulation optimum and providing practical guidance for hardware-aware deployment. The findings offer a principled recipe for balancing memory-bound Attention with compute-bound FFN, enabling near-optimal throughput and reduced idling in disaggregated LLM serving.
Abstract
Attention-FFN disaggregation (AFD) is an emerging architecture for LLM decoding that separates state-heavy, KV-cache-dominated Attention computation from stateless, compute-intensive FFN computation, connected by per-step communication. While AFD enables independent scaling of memory and compute resources, its performance is highly sensitive to the Attention/FFN provisioning ratio: mis-sizing induces step-level blocking and costly device idle time. We develop a tractable analytical framework for sizing AFD bundles in an $r$A-$1$F topology, where the key difficulty is that Attention-side work is nonstationary-token context grows and requests are continuously replenished with random lengths-while FFN work is stable given the aggregated batch. Using a probabilistic workload model, we derive closed-form rules for the optimal A/F ratio that maximize average throughput per instance across the system. A trace-calibrated AFD simulator validates the theory: across workloads, the theoretical optimal A/F ratio matches the simulation-optimal within 10%, and consistently reduces idle time.
