Skip to content

Ultra 3 vllm tuning - #2645

Merged
bxyu-nvidia merged 20 commits into
mainfrom
fsiino/ultra-vllm-tuning
Sep 19, 2026
Merged

bxyu-nvidia merged 20 commits into
mainfrom
fsiino/ultra-vllm-tuning

Conversation

@fsiino-nvidia

@fsiino-nvidia fsiino-nvidia commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

(Originally branched from fsiino/super35-vllm-model-tuning, PR #2599. After that PR merged, we moved the Ultra changes onto updated main and kept the shared launcher compatible. Main was subsequently merged again at f656822f6.)

What this PR does

  • Adds benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh: a fixed Ultra BF16 recipe using piecewise CUDA graphs on both tiers, MTP3, prefix caching, asynchronous prefill, synchronous decode, FP8 KV cache, FP16 Mamba state with stochastic rounding, and expert parallelism.
  • Adds opt-in coupled deployment to benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh. Ultra uses four prefill nodes and four decode nodes, each with four GPUs; each tier distributes the model across 16 GPUs. The default remains independent deployment for models that fit a complete replica on one node. Existing router defaults and sampling overrides are preserved.
  • Makes walltime and allocation segmentation configurable, bounds coupled startup health probes, and detects coupled prefill/router exits during startup and serving. Adds launcher regression coverage in tests/unit_tests/test_super_vllm_launcher.py.

Benchmark scores

Benchmark Earlier full run 7014044 / f656822f6 Non-eager full run 7093754 Tracker
Tau3-Banking 11.13% 11.34% 18.40%
Tau3-Average 58.86% 58.13% 64.60%
SciCode — full-problem accuracy 11.54% 9.62% 11.90%
AA-LCR 52.13% 54.22%* 64.10%
AA-Omniscience — OmniIndex 7.65% 7.58% 23.80%
GPQA Diamond 85.98% 87.56% 86.50%

*AA-LCR's newer score covers 1,457/1,600 attempts, versus 1,600/1,600 previously; the apparent increase is not a clean comparison. Tau3-Average equally weights Airline, Retail, Telecom, and Banking. Omniscience answer accuracy was 24.38%/24.08%; that is a different metric from OmniIndex and must not be compared with the tracker's OmniIndex value.

Score artifacts:

  • results/nemotron-3-ultra-bf16-p4d4-c16-mtp3-v0271-piecewise-copyinputs-full-suite-validation-20260908/resumable_aggregate_metrics.json
  • results/nemotron-3-ultra-mtp3-c16-syncdecode-full-super-20260912-023329/resumable_aggregate_metrics.json

Run command — Super suite, post-merge 0.29 (30 minutes)

EXPERIMENT_NAME="nemotron-3-ultra-mtp3-c24-v0290-postmerge-$(date -u +%Y%m%d-%H%M%S)"

MODEL=/lustre/fsw/portfolios/llmservice/users/igitman/hf_models/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16 \
VLLM_CONFIG=benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh \
EXPERIMENT_NAME="$EXPERIMENT_NAME" \
ROLLOUTS_FPATH="results/$EXPERIMENT_NAME/resumable.jsonl" \
EXPORT_TO_CSV=0 \
NUM_PREFILL_NODES=4 \
NUM_DECODE_NODES=4 \
VLLM_PD_DEPLOYMENT_MODE=coupled \
VLLM_SLURM_SEGMENT=4 \
SBATCH_ACCOUNT=nemotron_rl_algo \
SBATCH_PARTITION=batch_long \
SBATCH_QOS=normal \
SBATCH_TIME=2-00:00:00 \
SBATCH_GRES=gpu:4 \
SBATCH_EXPORT=ALL \
CONTAINER="/lustre/fsw/portfolios/llmservice/users/fsiino/repos/Gym-inkling-tuning/results/vllm/vllm-openai:v0.29.0___super-vl-evals-2a3c65b-ultra-with-gym-b894cbe-20260914-202306.sqsh" \
MOUNTS="/lustre:/lustre,$(pwd -P)/env.yaml:/opt/Gym/env.yaml:x-create=file,$(pwd -P)/results:/opt/Gym/results,$(pwd -P)/benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh:/opt/Gym/benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh:ro" \
bash benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh \
    --config benchmarks/nemotron_3.5_super/eval_container_config.yaml \
    '++num_samples_in_parallel=24' \
    '++resume_from_cache=true' \
    '++critpt_benchmark_agent.responses_api_agents.critpt_agent.datasets=[]' \
    '++hle_benchmark_equivalence_llm_judge_simple_agent.responses_api_agents.simple_agent.datasets=[]'

The two dataset-list overrides exclude CRITPT and HLE. Remove the corresponding final argument to include either benchmark in a fresh experiment. EXPORT_TO_CSV=0 skips the optional exporter, whose Omniscience metric-key mismatch remains unresolved; evaluation JSON and final aggregate metrics are still written.

Run command — SWE-bench Verified, post-merge 0.29 (30 minutes)

Uses the same Ultra recipe, container, concurrency 24, and coupled P4/D4 allocation as Super, with the OpenCode agent and OpenSandbox configs. Run from the repository root with the existing OpenSandbox connection configured in env.yaml or the environment. The distinct experiment name keeps SWE-bench results separate; no CRITPT/HLE exclusions are needed because the Super config is not loaded.

EXPERIMENT_NAME="nemotron-3-ultra-mtp3-c24-v0290-postmerge-swebench-verified-$(date -u +%Y%m%d-%H%M%S)"

MODEL=/lustre/fsw/portfolios/llmservice/users/igitman/hf_models/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16 \
VLLM_CONFIG=benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh \
EXPERIMENT_NAME="$EXPERIMENT_NAME" \
ROLLOUTS_FPATH="results/$EXPERIMENT_NAME/resumable.jsonl" \
EXPORT_TO_CSV=0 \
NUM_PREFILL_NODES=4 \
NUM_DECODE_NODES=4 \
VLLM_PD_DEPLOYMENT_MODE=coupled \
VLLM_SLURM_SEGMENT=4 \
SBATCH_ACCOUNT=nemotron_rl_algo \
SBATCH_PARTITION=batch_long \
SBATCH_QOS=normal \
SBATCH_TIME=2-00:00:00 \
SBATCH_GRES=gpu:4 \
SBATCH_EXPORT=ALL \
CONTAINER="/lustre/fsw/portfolios/llmservice/users/fsiino/repos/Gym-inkling-tuning/results/vllm/vllm-openai:v0.29.0___super-vl-evals-2a3c65b-ultra-with-gym-b894cbe-20260914-202306.sqsh" \
MOUNTS="/lustre:/lustre,$(pwd -P)/env.yaml:/opt/Gym/env.yaml:x-create=file,$(pwd -P)/results:/opt/Gym/results,$(pwd -P)/benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh:/opt/Gym/benchmarks/nemotron_3.5_super/vllm_configs/nemotron_3_ultra.sh:ro" \
bash benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh \
    --config responses_api_models/vllm_model/configs/vllm_model.yaml \
    --config benchmarks/swebench/verified/opencode.yaml \
    --config nemo_gym/sandbox/providers/opensandbox/configs/opensandbox.yaml \
    '++num_samples_in_parallel=24' \
    '++resume_from_cache=true'

Each command reserves eight nodes / 32 GPUs; running both simultaneously requires 16 nodes / 64 GPUs. These are separate 30-minute validation jobs, not full-suite score runs. Check model/router readiness, live generation, tokens/sec/request, waiting, KV usage, and saved-output health; additionally check sandbox startup and agent activity for SWE-bench. Startup and sandbox preparation consume part of the allocation, so SWE-bench may save few completed attempts within this window. The launcher submits a separate job-scoped cleanup job for each evaluation.

Command controls and resume

Control Valid values Why this command uses it
VLLM_PD_DEPLOYMENT_MODE independent (default), coupled Branch-added opt-in for multi-node tiers; Ultra requires coupled because a complete replica does not fit on one four-GPU node.
VLLM_SLURM_SEGMENT Unset or a positive integer Branch-added control; overrides main's SEGMENT. If both are unset/empty, use all allocated nodes as one segment. 4 aligns each segment with a four-node tier, the placement used in successful Ultra runs.
SEGMENT Unset or a positive integer Main's equivalent segmentation control, honored when VLLM_SLURM_SEGMENT is unset/empty. No need to set both.
SBATCH_TIME Slurm duration within account/partition limits Branch makes the prior 04:00:00 default configurable. 00:30:00 bounds this tuning test; it is not enough for the full suite.
VLLM_USE_V2_MODEL_RUNNER Launcher now explicitly sets 0 Main selects V1, which was faster in our tests. This no longer needs a command argument; submitting 1 will be overridden by the launcher. V1 is version-specific and deprecated, so future containers need revalidation.
SBATCH_EXPORT Slurm export setting; ALL here Existing Slurm control; carries the run environment, including the fixed output path, into the allocation.
++num_samples_in_parallel Positive integer Existing Gym concurrency control. 24 improved aggregate generation relative to 20 while averaging above 90 tokens/sec/request; it does not prove proportionally faster suite completion.
ROLLOUTS_FPATH + ++resume_from_cache Fixed output JSONL path; true or false Existing controls. Set a unique mounted results path and true on the first submission to preserve completed work across Slurm requeues.

For a manual resume, wait until the previous job stops, replace the timestamp-generating EXPERIMENT_NAME assignment with its exact previous experiment name, and rerun with the same fixed output path, model, recipe, container, datasets, and resume override. Preserve both resumable.jsonl and resumable_materialized_inputs.jsonl; the latter records the selected tasks. A Slurm requeue reuses the submitted environment without needing that manual edit. Interrupted, unsaved work may be repeated; neither control configures Slurm's requeue policy.

Without ROLLOUTS_FPATH, the launcher chooses a new timestamped output path at each restart, so ++resume_from_cache=true alone will not find the prior results. Without resume enabled, Gym may clear the selected output. For any new tuning configuration or dataset selection, use a fresh experiment/output path rather than mixing results with a previous run.

Changes since review at f656822f6

  • Hardcoded the tuned settings: removed ULTRA_* switches and their validation branches. Prefill/decode memory utilization is 0.90/0.95, batched-token limits are 16384/8192, maximum sequences is 64, and MTP drafts three extra tokens. Graph modes, copied inputs, and decode capture sizes are fixed in the recipe.
  • Removed eager enforcement: both tiers use PIECEWISE graphs with copied inputs; no --enforce-eager flag or eager fallback remains.
  • Enabled prefix caching: removed the old disabling flag and warning. The original multiple-local-block assertion did not recur in the subsequent full vLLM 0.27.1 run or the short 0.29 tests. This is not a claim that all cache warnings or output-quality problems are fixed.
  • Applied async scheduling where supported by tuning: enabled on prefill, disabled on decode. Decode async was retested on 0.29 in 7153011; matching post-warmup durations gave 89.96 versus 95.55 tokens/sec/request with synchronous decode, approximately 6% slower. The reviewer recommendation was to use it if it helps, not require it on both tiers.
  • Reused existing concurrency/resume controls: removed NUM_SAMPLES_IN_PARALLEL and RESUME_EVAL_ON_REQUEUE. Commands now use Hydra's ++num_samples_in_parallel, a fixed ROLLOUTS_FPATH, and ++resume_from_cache=true. Launcher tests cover argument preservation and stable output paths across requeues and manual restarts.
  • Reconciled the latest main launcher changes: preserved main's V1 runner setting, router-default balancing thresholds, and cpu-normal cleanup QOS. Support both main's SEGMENT and our higher-priority VLLM_SLURM_SEGMENT, falling back to the calculated node count and emitting exactly one --segment argument. Coupled serving remains opt-in.

@copy-pr-bot

copy-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Allow experiments to override the speculative-token count while preserving the current default.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
@fsiino-nvidia
fsiino-nvidia force-pushed the fsiino/ultra-vllm-tuning branch from 36ba596 to b894cbe Compare September 8, 2026 20:27
Remove obsolete experiment switches and retain the validated MTP3 defaults.
Simplify Slurm argument handling and correct the coupled decode health check.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Detect prefill failures while waiting for decode readiness.
Honor explicit concurrency and resume overrides over environment defaults.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
@fsiino-nvidia
fsiino-nvidia marked this pull request as ready for review September 9, 2026 21:32
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
@fsiino-nvidia fsiino-nvidia changed the title Fsiino/ultra vllm tuning 08202026 Ultra 3 vllm tuning Sep 9, 2026
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test a26a1e2

Add connection and request timeouts so stalled probes cannot block
prefill failure detection.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Monitor prefill and router processes, propagate unexpected exits,
and stop the surviving process.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Cover override precedence, resume paths, health-check timeouts,
and coupled-mode failure detection and cancellation cleanup.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Test independent and coupled node roles, existing model settings,
submission overrides, invalid inputs, and serving-only execution.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>

# Conflicts:
#	benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test f656822


# The defaults reproduce the full-suite MTP3 configuration validated in Run
# 060: eager prefill and piecewise decode CUDA graphs with graph-owned inputs.
ULTRA_PREFILL_GPU_MEMORY_UTILIZATION="${ULTRA_PREFILL_GPU_MEMORY_UTILIZATION:-0.90}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we hardcode these once we have a roughly tuned config?

;;
esac

case "$ULTRA_DECODE_CUDAGRAPH_COPY_INPUTS" in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, can we hardcode this one things are tuned?

--distributed-timeout-seconds 3600
# NIXL-transferred Mamba state must not coexist with locally retained
# prefix-cache blocks; doing so triggers the multiple-local-block assertion.
--no-enable-prefix-caching

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should be fixed with more recent containers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the container 0.27.1 -> 0.29 and reran.

--tensor-parallel-size 4
--no-async-scheduling
# Eager prefill avoids the compiled/CUDA-graph stalls observed during tuning.
--enforce-eager

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not enforce eager because it's much slower

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed --enforce-eager

--max-num-seqs "$ULTRA_MAX_NUM_SEQS"
--data-parallel-size-local 1
--tensor-parallel-size 4
--no-async-scheduling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we recently got async scheduling accuracy working!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I've enabled async scheduling on prefill, but kept it disabled on decode. Decode async was retested with vllm 0.29 but throughput was 89.96 versus 95.55 tokens/sec/request with synchronous decode.

@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Sep 11, 2026
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
  Enable prefix caching and piecewise graphs with async prefill and synchronous decode.
  Replace tuning overrides and eager fallback with settings tested in run 7091385.

Signed-off-by: Frankie Siino <fsiino@nvidia.com>
@github-actions github-actions Bot added the sla:author-overdue Author response is over the one-business-day SLA label Sep 14, 2026
Signed-off-by: Frankie Siino <fsiino@nvidia.com>

# Conflicts:
#	benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh
@github-actions github-actions Bot removed the sla:author-overdue Author response is over the one-business-day SLA label Sep 15, 2026
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

/ok to test

@fsiino-nvidia, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

Signed-off-by: Frankie Siino <fsiino@nvidia.com>

# Conflicts:
#	benchmarks/nemotron_3.5_super/sbatch_external_vllm.sh
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

/ok to test

@fsiino-nvidia, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test ac30c28

@bxyu-nvidia
bxyu-nvidia added this pull request to the merge queue Sep 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/35420126531

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/35420453311

Merged via the queue into main with commit dba68bb Sep 19, 2026
42 checks passed
@bxyu-nvidia
bxyu-nvidia deleted the fsiino/ultra-vllm-tuning branch September 19, 2026 04:20

This branch was previously deployed

1 inactive deployment
public — ac30c288 Deployed Sep 19, 2026 by copy-pr-bot[bot] via release / finalize / notify #3268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants