Repository navigation
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.
Summary
Add the opt-in
ds_load_balancepolicy to route P/D requests using estimated outstanding prefill compute and decode request/KV load. The name credits DeepSeek's deployment article; this implementation adapts its instance-level routing guidance to the existing Service protocol.TimePredictorto estimate the remaining prefill computation.third_party/Mooncakemetadata-only adapter behindUSE_MOONCAKE_PREFIX_LOOKUP=ON. The default build keeps it disabled; no vcpkg dependency changes. The Service does not allocate a Store DRAM segment or move KV payloads.Configuration and startup examples are in
docs/ds_load_balance.md.Validation
LEAST_TIMEtods_load_balance, including its CLI value, class/files, log tags and tests, without changing the routing rules. The focused suite was rebuilt and rerun after the rename.28e32d72a22570edd046c445839ed488e53ae1a0.Ten ds_load_balance requests completed in addition to the deliberately cancelled stream. The multi-turn second request had approximately 669 ms client TTFT. The first request was non-streaming, so its full-response latency is not TTFT. Owned test services were stopped and cleanup was verified.
Scope and limitations
min_tokensfailed task-pipeline sampling validation on D. Final cases usedmax_tokensplusignore_eos, omittingmin_tokens; this separate engine issue is not fixed here. A host-specific CPUinfo read stall also required a private snapshot mount during model initialization.