[Presets] Add PD Disaggregation Support - #4227
Open
Bihan wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preset Used :
Summary of Trial Logs for above preset
The agent was asked to justify its P:D ratio before each trial. Its own calculation said the right ratio depends on how efficiently prefill runs — and that it had to measure this first. It then picked a ratio without measuring: it planned 2P + 2D, but ran 3P + 1D in trial 1, claiming only one machine had enough memory to act as a decode node. In fact three of the four did. Trial 2 went back to 2P:2D, and got 37% more throughput.
Conclusion: We need to teach the agent how to plan a PD ratio from the workload and constraints.
Correctly identified that KV transfer between prefill and decode as the bottleneck and then tuned UCX over TCP. Untuned UCX-over-TCP sent small pieces of KV. After tuning it used bigger TCP chunks, a more direct copy (put_zcopy), and several sends at once. It changed the settings via ENV variables and it doubled the throughput.
To meet the TTFT cap, the agent switched the service router from
cache_awaretoround_robinbecause cache_aware tokenizes each prompt on the router. That extra work happens before the first token, so it inflates TTFT; round-robin skips it.Conclusion: The agent did not log
cache_awareis anyway a poor fit here becauseshared_prefix_tokens=0. We need to teach the agent to justify changes in routing policy. The justification should be based on workload and constraints.