[Rollout] Add vLLM encoder-prefill disaggregation - #370
Conversation
94926e0 to
80591de
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces native support for vLLM Encoder-Prefill-Decode (EPD) disaggregation for multimodal rollouts, including documentation, configuration validation, engine startup orchestration, and image priming logic. The review feedback highlights two important configuration issues: first, a shallow dictionary update when applying user overrides can overwrite the nested ec_transfer_config (which contains the critical generated shared_storage_path); second, command-line --vllm-ec-transfer-config arguments are silently ignored when EPD overrides are active, necessitating a merge with the base configuration.
b17ec2c to
0e43d31
Compare
96b42ce to
35f128b
Compare
4e220f4 to
f05995f
Compare
c665694 to
3b26af9
Compare
Signed-off-by: aoshen02 <aoshen@inferact.ai>
3b26af9 to
20debb2
Compare
|
Could you please review the code? I've simplified it. |
Thanks for the update. I've reviewed the simplified version, and it looks good to me. @aoshen02 |

This PR adds native vLLM Encoder-Prefill Disaggregation (EPD) to Vime. It uses
worker_type: encoderand composes with the existing regular and PD rollout paths.The implementation has two main parts:
Related to #11.
1. Deployment configuration and override flow
The supported topologies are:
Vime rejects incomplete or mixed EPD topologies during config resolution.
For each EPD model, the Ray orchestration layer creates one model-scoped
/dev/shm/vime-ec-*path. This path is the shared part of the EC configuration and is passed through the generated group overrides to encoder and EC-consumer groups._compute_server_args()then combines that shared component with worker-specific vLLM configuration:encoderECExampleConnector,ec_producer,enable_prefix_caching=false, andmm_encoder_only=trueregularECExampleConnectorandec_consumerprefillECExampleConnectorandec_consumerdecodeThe startup order is also topology-aware. Encoder groups are started and health-checked first, then regular or prefill/decode groups are started. Encoder engines are not registered with the regular or PD router.
Group-level
overridesremain the highest-priority user configuration. The orchestration layer first provides the generated shared EC component, then the current group's overrides are applied. At server-argument construction time, Vime supplies the default connector and worker-specific role, while explicitly provided native EC fields override those defaults. This keeps the existing per-group override mechanism available for advanced vLLM configuration.The current default uses upstream vLLM's
ECExampleConnector, so built-in EPD deployment is limited to one node. Vime removes only the automatically generated/dev/shm/vime-ec-*paths during shutdown.2. Rollout-side encoder priming
Encoder routing is implemented in the rollout layer.
The rollout manager exposes model-scoped encoder endpoints separately from router endpoints. Before a multimodal request enters the existing render/generate path, the new
prime_encoder()helper:/v1/chat/completionsrequest per image;max_tokens=1,stream=false, and a uniquex-request-id;After priming completes, the request follows the existing flow:
For E+P+D, the existing PD router and KVConnector continue to coordinate prefill and decode. The encoder remains outside that router and publishes embeddings through ECConnector.
The default multimodal rollout, streaming rollout, and the repository's Geo3K multi-turn rollout call
prime_encoder()automatically. Custom multimodal rollout functions must call the same helper before render/generate:Validation
Added CPU unit coverage for:
Manual end-to-end validation was completed with
Qwen/Qwen2.5-VL-3B-Instructon 4 x RTX 4090 Plus using1 encoder + 1 prefill + 1 decode + 1 placeholder. Encoder priming, EC transfer, PD generation, training weight synchronization, and EC cache cleanup all completed successfully.Added a vLLM-only multimodal GPU acceptance test to the
vllm-configBuildkite suite. It runs a regular baseline and1 encoder + 1 prefill + 1 decodewithQwen/Qwen2.5-VL-3B-Instructon three GPUs, then checks deterministic token parity, live EC/KV roles, PD router membership, text-only encoder bypass, and EC cache cleanup.Documentation
Added matching English and Chinese EPD guides covering topology, data flow, connector behavior, defaults, and the custom rollout contract. The vLLM configuration reference now documents the
encoderworker type.AI assistance disclosure
This PR was developed with assistance from OpenAI Codex. I reviewed the changes and validated the implementation end to end.