feat: length-aware rollout scheduling for cross-DP generation - #4007
Draft
zaifengp-maker wants to merge 18 commits into
Draft
zaifengp-maker wants to merge 18 commits into
zaifengp-maker wants to merge 18 commits into
Conversation
…2261) (NVIDIA-NeMo#2262) Signed-off-by: Kajal Jain <kajalj@nvidia.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…IDIA-NeMo#2257) Signed-off-by: Yuki Huang <yukih@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Yuki Huang <yukih@nvidia.com>
…A-NeMo#2235) (NVIDIA-NeMo#2263) Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…nto r0.6.0 (NVIDIA-NeMo#2266) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Rayen <ruit@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Yuki Huang <yukih@nvidia.com>
…`r0.6.0` (NVIDIA-NeMo#2288) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Terry Kong <terryk@nvidia.com>
…sues from QA (NVIDIA-NeMo#2290) Signed-off-by: anwithk <anwithk@nvidia.com> Signed-off-by: Terry Kong <terryk@nvidia.com> Co-authored-by: Anwith Kiran <anwithk@nvidia.com>
….0` (NVIDIA-NeMo#2308) Signed-off-by: Kajal Jain <kajalj@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: kajalj22 <kajalj@nvidia.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…r0.6.0` (NVIDIA-NeMo#2311) Signed-off-by: Yuki Huang <yukih@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Yuki Huang <yukih@nvidia.com>
…o `r0.6.0` (NVIDIA-NeMo#2307) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Terry Kong <terryk@nvidia.com>
…IA-NeMo#2313) Signed-off-by: Aditya Vavre <avavre@nvidia.com> Signed-off-by: adityavavreNVDA <avavre@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: adityavavreNVDA <avavre@nvidia.com> Co-authored-by: Terry Kong <terryk@nvidia.com>
…VIDIA-NeMo#2317) Signed-off-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com> Signed-off-by: Guyue Huang <guyueh@nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Co-authored-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
Signed-off-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Co-authored-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com>
) Signed-off-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Signed-off-by: Kajal Jain <kajalj@nvidia.com> Co-authored-by: Guyue Huang <guyueh@login-lyris02.lyris.clusters.nvidia.com> Co-authored-by: Kajal Jain <kajalj@nvidia.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…Mo#2364) Signed-off-by: Guyue Huang <guyueh@nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Signed-off-by: Parth Mannan <pmannan@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com> Co-authored-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Co-authored-by: Parth Mannan <pmannan@nvidia.com>
…tion
Publishable subset of the LFS prototype, rebuilt on the v0.6.0 tag so it
carries no site-specific state.
What this adds
--------------
nemo_rl/models/generation/vllm/lfs/ admission + cross-DP dispatch package
(scheduler, dispatcher, engine
schedulers, concurrency cap, group
state, validation, diagnostics)
vllm_step_trace.py per-step engine trace
model_step_gpu_profiler.py bounded Nsight capture of model steps
nested_runtime_env.py / ray_executor.py
runtime-env propagation into vLLM's
Ray workers without source mutation
inflight_profiler.py, vllm_metric_sampler.py
in-flight rollout + DP batch stats
forced_sequence_logits_processor.py deterministic sequence replay
plus the corresponding changes in vllm_generation / vllm_worker /
vllm_worker_async / vllm_backend, grpo, rollouts, async_utils and dapo_math,
and 19 unit tests.
What was left out, and why
--------------------------
The research harness (length-predict/, 401 files) and the tests that drive it
are not included. Its reference results embed the identity of the machines
that produced them -- node hostnames, scheduler job ids, per-user filesystem
paths -- and it also carries four third-party papers as PDFs. None of that
belongs in a source tree, and none of it is needed to read or run the
scheduler.
The perf scripts under scripts/ defaulted to one user's filesystem and one
Slurm account. They now take WORK_DIR and SLURM_ACCOUNT as required inputs
rather than defaulting, so a misconfigured run fails at submission instead of
writing somewhere unintended.
One thing to know: the LFS dispatcher records os.uname().nodename into its
diagnostic events, so diagnostics collected from a run carry hostnames. That
is useful when debugging cross-node placement, but it means diagnostic output
needs the same scrub as any other artifact before it is published.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
What does this PR do ?
Schedules rollout requests by predicted output length instead of FCFS, so a cross-DP generation wave is not held open by one long straggler.
Within a wave, requests are admitted and placed across DP replicas by a length
estimate rather than arrival order. The PR also carries the tracing and
profiling used to evaluate the idea.
nemo_rl/models/generation/vllm/lfs/— the admission and cross-DP dispatchpackage: scheduler, dispatcher, per-engine schedulers, concurrency cap,
group state, validation, diagnostics.
vllm_step_trace.py— per-step engine trace.model_step_gpu_profiler.py— bounded Nsight capture around model steps.nested_runtime_env.py/ray_executor.py— propagate a runtime env intovLLM's Ray workers without mutating vLLM sources.
inflight_profiler.py,vllm_metric_sampler.py— in-flight rollout andDP-batch statistics.
forced_sequence_logits_processor.py— deterministic sequence replay, usedto make scheduling experiments reproducible.
plus the corresponding changes in
vllm_generation,vllm_worker,vllm_worker_async,vllm_backend,grpo,rollouts,async_utilsanddapo_math, and 19 unit tests.Issues
None filed yet. Happy to open one to hold the design discussion if that is
preferred over discussing it here.
Usage
LFS is off by default; generation behavior is unchanged unless it is enabled.
It is currently driven by environment variables rather than config keys:
The one config key added is for the tracing facility, not the scheduler:
Before your PR is "Ready for review"
Pre checks:
tests/unit/models/generation/vllm/