Repository navigation
feat(inference): default api_server_count to 4 for single-engine servers - #3943
Closed
faresobeid wants to merge 2 commits into
Closed
faresobeid wants to merge 2 commits into
faresobeid wants to merge 2 commits into
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.
When unset,
inference.vllm.api_server_countnow defaults tomax(4, local DP size), the same rule everywhere. LoRA still forces 1.Why: with one API server, all request parsing and response serialization runs in a single process, and its GC pauses stall
/healthand/metrics. Measured on GLM-4.5-Air TP8, 1 node, vLLM 0.31, 130 closed-loop/inference/v1/generaterequests:8 adds nothing over 4.
/metricswith 4 API servers (vLLM multiprocess Prometheus) was checked against scheduler stats recorded inside EngineCore, while the orchestrator'sInferenceMetricsCollector+ConcurrencyControllerdrove the load (600 s per arm):engine="0"), no per-process duplicates.num_requests_running/num_requests_waitingmatch engine truth within 2 (p99 1);kv_cache_usage_percwithin 0.05 (p99 0.025). With 1 API server the max error was 56 / 42, from stale reads during GC stalls.num_preemptions_totaland prefix-cache counters equal engine truth;request_success_total, TTFT count andgeneration_tokens_totalare counted once per request.vllm:iteration_tokens_total(W&B passthrough, not used by the controller) changes: its_countis ~3x because each API server observes its own share of every engine step.Admin routes (
/pause,/resume,/update_weights,/init_broadcaster) act on EngineCore, so they work from any API server.Config changes:
VllmConfig.auto_setup_api_server_count: unset ->max(4, local DP size). The RL/SFT single-node DP fills (api_server_count < dp -> dp) then also resolve tomax(4, dp).api_server_count = max(4, inferred_dp_local).api_server_count = 1where they turn oninference.vllm.enable_lora(that happens afterVllmConfigvalidation).api_server_counttodp_per_nodewhen it is lower, instead of only when it equals 1. The per-rank launchers still pass--vllm.api-server-count 1, so multi-node runtime is unchanged.Resolved
api_server_countover allconfigs/+examples/TOMLs: 28 configs change: 27 single-engine non-LoRA configs (1 -> 4) and one DP=2 config (2 -> 4). LoRA, DP>=4 and disaggregated configs are unchanged.Tests:
pytest tests/unit/orchestrator tests/unit/test_configs.py tests/unit/inference -m "not gpu"(316 passed),ruff check,ruff format --check.