-
Notifications
You must be signed in to change notification settings - Fork 518
[OMNIML-4962] specdec_bench parent — Qwen/Qwen3.5-4B / DFlash / vLLM #1638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
da6123c
[OMNIML-4962] specdec_bench cell t0_d3
ChenhanYu 0cafa1f
fix: DFlash -> DFLASH (case-sensitive algorithm name)
ChenhanYu c97972f
fix: add --draft_model_dir for DFLASH (required arg)
ChenhanYu 5a425bf
fix: use vllm v0.22.1 container (dflash support)
ChenhanYu 3b04b6b
align cell YAML with #1564 sweep-name convention + add explanatory co…
ChenhanYu 89fd506
drop redundant per-cell runtime_params for t0_d3
ChenhanYu 15c5170
switch to --max_seq_len 40960 (matches the --max_seq_len CLI flag add…
ChenhanYu 1f264fc
specdec_bench: refactor Qwen3.5-4B DFlash example to parent-only (pos…
ChenhanYu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
tools/launcher/examples/Qwen/Qwen3.5-4B/specdec_bench_dflash_vllm.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # SPEED-bench DFlash speculative-decoding run for Qwen3.5-4B via vLLM. | ||
| # | ||
| # Companion to specdec_bench_mtp_vllm.yaml. This variant exercises the | ||
| # z-lab/Qwen3.5-4B-DFlash external draft model. DFlash uses | ||
| # vLLM's `speculative_num_draft_tokens`, which the specdec_bench wrapper | ||
| # computes from `--block_size`. `--block_size = draft_length + 1` | ||
| # (e.g. draft_length=3 → block_size=4; draft_length=7 → block_size=8). | ||
| # | ||
| # Container: `vllm/vllm-openai:v0.22.1`+ is required. The `dflash` | ||
| # speculative method landed in vLLM v0.22.0; older tags reject | ||
| # `--speculative_algorithm DFLASH` with "Input should be 'ngram', ..., | ||
| # 'mtp'". | ||
| # | ||
| # Cells in OMNIML-4961 (t0_d3 / t0_d7 / t1_d3 / t1_d7) override per-cell | ||
| # knobs (temperature, block_size, save_dir, num_requests) via | ||
| # pipeline.task_N.args+=[...] at slurm-invoke time — no per-cell file is | ||
| # committed (post-#1564 convention). | ||
| # | ||
| # Slurm run on cw_dfw: | ||
| # uv run slurm.py \ | ||
| # --yaml modules/Model-Optimizer/tools/launcher/examples/Qwen/Qwen3.5-4B/specdec_bench_dflash_vllm.yaml \ | ||
| # --yes detach=true \ | ||
| # pipeline.task_0.args+=["--temperature 0","--block_size 4","--save_dir /scratchspace/<sweep>/qualitative"] \ | ||
| # pipeline.task_1.args+=["--temperature 0","--block_size 4","--save_dir /scratchspace/<sweep>/throughput_32k","--num_requests 80","--max_seq_len 65536"] | ||
| # | ||
| # Reference run: cicd_1780697785 (OMNIML-4962, cw_dfw) produced | ||
| # qualitative Average_AL = 5.0395 | ||
| # throughput_32k Average_AL = 6.8958 | ||
| # See OMNIML-4962 INTERN-ARTIFACTS worklog for the full payload. | ||
|
|
||
| job_name: Qwen3.5-4B_specdec_bench_dflash_vllm | ||
|
|
||
| pipeline: | ||
| global_vars: | ||
| hf_model: /hf-local/Qwen/Qwen3.5-4B | ||
| draft_model: /hf-local/z-lab/Qwen3.5-4B-DFlash | ||
|
|
||
| # task_0: SPEED qualitative split — quality / acceptance-rate numbers. | ||
| # tp_size=2 + concurrency=32 trades aa_timing fidelity for ~30x | ||
| # wall-clock speedup; acceptance-length (AL) is concurrency-independent | ||
| # and is the primary metric we care about for this split. | ||
| task_0: | ||
| script: common/specdec_bench/run.sh | ||
| args: | ||
| - --dataset speed | ||
| - --dataset_path /hf-local/nvidia/SPEED-Bench-Internal/qualitative | ||
| - --engine VLLM | ||
| - --speculative_algorithm DFLASH | ||
| - --draft_model_dir <<global_vars.draft_model>> | ||
| - --block_size 4 | ||
| - --tp_size 2 | ||
| - --ep_size 1 | ||
| - --concurrency 32 | ||
| - --output_length 4096 | ||
| - --aa_timing | ||
| - --show_progress | ||
| - --save_dir /scratchspace/{sweep_name_default}/qualitative | ||
| environment: | ||
| - HF_MODEL_CKPT: <<global_vars.hf_model>> | ||
| - HF_LOCAL: /hf-local | ||
| slurm_config: | ||
| _factory_: "slurm_factory" | ||
| nodes: 1 | ||
| ntasks_per_node: 1 | ||
| gpus_per_node: 2 | ||
| container: vllm/vllm-openai:v0.22.1 | ||
|
|
||
| # task_1: SPEED throughput_32k split — long-context throughput. | ||
| # `--num_requests 80` caps the run at 80 samples (split has 1,536) so | ||
| # it fits in the 4h Slurm time-limit; each 32K-input sample takes | ||
| # ~60-90s. tp_size=2 doubles the KV-cache budget across 2 GPUs; | ||
| # concurrency=8 keeps 8 * 32K = 256K tokens of in-flight KV under that | ||
| # doubled budget. | ||
| task_1: | ||
| script: common/specdec_bench/run.sh | ||
| args: | ||
| - --dataset speed | ||
| - --dataset_path /hf-local/nvidia/SPEED-Bench-Internal/throughput_32k | ||
| - --engine VLLM | ||
| - --speculative_algorithm DFLASH | ||
| - --draft_model_dir <<global_vars.draft_model>> | ||
| - --block_size 4 | ||
| - --tp_size 2 | ||
| - --ep_size 1 | ||
| - --concurrency 8 | ||
| - --num_requests 80 | ||
| - --output_length 4096 | ||
| - --aa_timing | ||
| - --show_progress | ||
| - --save_dir /scratchspace/{sweep_name_default}/throughput_32k | ||
| environment: | ||
| - HF_MODEL_CKPT: <<global_vars.hf_model>> | ||
| - HF_LOCAL: /hf-local | ||
| slurm_config: | ||
| _factory_: "slurm_factory" | ||
| nodes: 1 | ||
| ntasks_per_node: 1 | ||
| gpus_per_node: 2 | ||
| container: vllm/vllm-openai:v0.22.1 | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[IMPORTANT Compatibility] This header documents
--block_sizeas the wrapper flag and uses it on lines 50 / 82 / 23-24, but the same PR'srun.pychange deletes the--block_sizeargparse entry. As-is,python3 run.py ... --block_size 4exits withargparse"unrecognized arguments". Either restore--block_sizein run.py (see comment onrun.py:192) or replace these args with the surviving mechanism (e.g.--runtime_paramscarryingengine_args.num_speculative_tokens) and update this header to match.Also worth re-checking the reference-run AL numbers (lines 27-28): the cited
Average_ALof 5.04 / 6.90 was produced whenblock_size=4was actually being plumbed; if a future invocation falls back to the vllm.py default of 8, the same YAML will produce different acceptance-length numbers.