Manuscript Offprint

arXiv:2609.00993

AInfer-PD: Communication-Safe In-Place Prefill-Decode Multiplexing for Distributed MoE Rollouts

Guowei Wang, Chaokun Yang, Zhenxuan Pan, Yuhong Guo, Minghua Zhu, Zhechuan Zhang, Shuo Wan, Xiaowei Zhu

Guowei Wang

Ant Group

China

Chaokun Yang

Ant Group

China

Minghua Zhu

Ant Group

China

Zhechuan Zhang

Ant Group

China

Zhenxuan Pan

Ant Group

China

Shuo Wan

Ant Group

China

Yuhong Guo

Ant Group

China

Xiaowei Zhu

Ant Group

China

Abstract

Rollout inference often dominates the wall-clock time of large-scale reinforcement learning (RL). In agentic RL, each trajectory alternates between model generation and environment interaction over multiple turns. Asynchronous trajectories consequently introduce new prefill (P) work while other trajectories remain in decode (D), making P/D coexistence a persistent property of the rollout rather than a one-time prompt-ingestion event.

On shared accelerators, persistent P/D coexistence can make prefill interfere with latency-sensitive decode and prolong rollout completion. P/D disaggregation avoids this colocation but requires separate device pools and KV-cache transfers. In-place multiplexing retains shared devices and KV state, but existing designs lack the communication isolation needed for large MoE deployments that combine attention TP/DP with distributed expert execution. In practical implementations, P and D can issue intersecting collectives in inconsistent cross-rank orders; DeepEP's P and D paths also share mutable protocol state.

We present AINFER-PD, which extends in-place P/D multiplexing to distributed MoE rollouts. AINFER-PD coordinates P/D collective order across ranks and gives the two DeepEP paths independent communication state, making crossed ADP/ATP and DeepEP paths safe for concurrent P/D execution. The design retains shared model weights and KV storage while coordinating P and D on the same devices. Across repeated single-node prefill-intensive workloads, AINFER-PD reduces fixed-workload rollout completion time by 7.1–22.5% relative to the same AInfer engine with P/D multiplexing disabled and by 24.8–32.9% relative to SGLang. On two nodes, the reductions are 18.0–35.3% and 18.3–31.8%, respectively. In a same-engine ablation, fine-grained boundaries reduce completion time by a further 8.6–19.8% over whole-epoch asynchronous enqueue.

1 Introduction

Rollout generation—the inference stage that produces trajectories for optimization—often accounts for a large fraction of reinforcement-learning (RL) training time [6, 8, 17]. Agentic

RL tasks such as software engineering, web navigation, and interactive tool use make this workload markedly different from conventional single-turn serving. An agent decodes an action, waits for a tool or environment response, appends the observation, and prefills the expanded context before continuing generation. Because trajectories differ in tool latency, generation length, and termination time, continuation prefills recur while other trajectories are still decoding.

The systems objective is therefore to finish a fixed collection of dependent trajectories quickly. Delaying decode postpones the environment interaction that releases the next turn; delaying a returned prefill postpones that turn's decode. When the phases share accelerators, long and variable P batches also compete with latency-sensitive D for compute and communication, increasing rollout completion time.

Two broad approaches address this interference. P/D disaggregation uses separate worker pools but requires additional capacity and KV transfer [15, 16, 21]. In-place multiplexing shares devices, weights, and KV state, and limits local interference through scheduling or resource partitioning [1, 2, 5, 10, 11]. Its communication isolation, however, does not cover important large-MoE execution paths.

Large MoE deployments combine attention data parallelism, optional tensor parallelism within each attention replica, and expert communication across a wider group [3]. In common serving paths, P uses a model-wide TP AllReduce while graph-replayed D uses a DP-attention ReduceScatter/AllGather. Intersecting groups and phase-skewed replicas can then form a distributed progress cycle despite valid local stream orders. DeepEP creates a second requirement: its normal P path and low-latency D path [4] share protocol state not designed for concurrent execution.

We present AINFER-PD for communication-safe in-place P/D multiplexing in distributed MoE rollout engines. It orders intersecting ADP/ATP collectives across ranks, while safe communication boundaries let successive D iterations advance through a long P execution. It also extends DeepEP with phase-owned buffers, counters, workspaces, events, and queue-pair ranges so normal-P and low-latency-D communication can coexist within one runtime. These mechanisms

Figure

Figure 1. P/D execution choices. Disaggregation separates model instances and transfers KV state. In-place systems share model and KV state. AINFER-PD adds cross-rank collective ordering and phase-owned expert-communication state to the in-place design.

Figure

Figure 2. A crossed collective-order failure in an ADP/ATP path. Attention replicas expose the P full-group collective and D DP-attention collective in opposite orders, forming a device progress cycle. AINFER-PD orders the conflicting P collective after D on every rank; P computation and non-intersecting communication continue asynchronously.

work with in-place P/D scheduling to support concurrent execution on the crossed ADP/ATP and DeepEP paths while retaining one model and KV state.

We evaluate AINFER-PD using anonymized internal RL traces on one- and two-node H20-3E deployments. Across the repeated single-node prefill-intensive profiles in Figure 7, AINFER-PD reduces fixed-workload rollout completion time by 7.1–22.5% relative to the same AInfer engine with P/D multiplexing disabled and by 24.8–32.9% relative to SGLang. A two-node campaign yields reductions of 18.0–35.3% and

18.3–31.8%, respectively, with a TTFT trade-off. Table 5 reports a same-engine ablation in which fine-grained ordering improves completion by 8.6–19.8% over whole-epoch asynchronous enqueue.

This paper makes three contributions:

  • We identify a distributed ordering problem that arises when phase-skewed attention replicas use intersecting P and D collective paths, and define the ordering required to remove the observed progress cycle.
  • We design a rank-aligned segment turnstile and extend DeepEP with phase-owned mutable state, enabling concurrent normal-P and low-latency-D communication while weights and KV storage remain shared.
  • We integrate the mechanisms into an MoE rollout engine and evaluate their end-to-end effects across parallel topologies, precisions, MTP modes, rollout pressure, and one- and two-node deployments.