-
Notifications
You must be signed in to change notification settings - Fork 306
[Klaud Cold] Add H200 Qwen3.8-27B bf16 vLLM TP1 DSpark 1k1k / 新增 H200 Qwen3.8-27B bf16 vLLM TP1 DSpark 1k1k 配方 #3261
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
Open
functionstackx
wants to merge
3
commits into
main
Choose a base branch
from
feat/qwen38-27b-h200-vllm-dspark
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+140
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
006f1cd
qwen3.827b-bf16-h200-vllm-mtp: add Qwen3.8-27B bf16 vLLM TP1 DSpark 1…
functionstackx 8ead02d
qwen3.827b-bf16-h200-vllm-mtp: size --max-num-seqs to the sweep and d…
functionstackx b168416
chore: refresh PR #3261 for sweep reuse [skip-sweep]
functionstackx 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
111 changes: 111 additions & 0 deletions
111
benchmarks/single_node/fixed_seq_len/qwen3.827b_bf16_h200_vllm_mtp.sh
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,111 @@ | ||
| #!/usr/bin/env bash | ||
| set -eo pipefail | ||
|
|
||
| # Qwen3.8-27B (bf16, dense hybrid attention: 48 linear-attention and 16 full | ||
| # attention layers) on one H200, served by vLLM with the RadixArk DSpark drafter | ||
| # (Doopeworld's vLLM-loadable copy) drafting seven tokens per step. | ||
| # https://recipes.vllm.ai/Qwen/Qwen3.8-27B | ||
| # https://huggingface.co/Doopeworld/Qwen3.8-27B-DSpark-vLLM | ||
| source "$(dirname "$0")/../../benchmark_lib.sh" | ||
|
|
||
| check_env_vars MODEL TP CONC ISL OSL RANDOM_RANGE_RATIO RESULT_FILENAME | ||
|
|
||
| if [[ -n "${SLURM_JOB_ID:-}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" | ||
| fi | ||
|
|
||
| if [[ "$TP" -ne 1 ]]; then | ||
| echo "This recipe serves Qwen3.8-27B on a single GPU; got TP=$TP" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| DRAFT_MODEL="Doopeworld/Qwen3.8-27B-DSpark-vLLM" | ||
| # The drafter's trained block size. Its card measured k=4 and k=6 slower than | ||
| # k=7 despite the late positions' low acceptance: per-step overhead dominates | ||
| # the per-drafted-token cost. | ||
| NUM_SPEC_TOKENS=7 | ||
|
|
||
| nvidia-smi | ||
|
|
||
| # Complete/resume partial downloads instead of trusting nonempty directories. | ||
| if [[ "$MODEL" != /* ]]; then hf download "$MODEL"; fi | ||
| hf download "$DRAFT_MODEL" | ||
|
|
||
| SERVER_LOG=/workspace/server.log | ||
|
|
||
| # Serve the matrix context (isl + osl + slack), not the checkpoint's 262K; | ||
| # accuracy evals use the eval context benchmark_lib derives. | ||
| MODEL_LEN="${MAX_MODEL_LEN:-$((ISL + OSL + 256))}" | ||
| if [[ "${EVAL_ONLY:-false}" == true ]]; then | ||
| setup_eval_context | ||
| MODEL_LEN="$EVAL_MAX_MODEL_LEN" | ||
| fi | ||
|
|
||
| # vLLM's default max-num-seqs (1024) exceeds the GDN/Mamba cache blocks that fit | ||
| # next to the bf16 weights (472 on an 80 GB H100, run 35357364404) and engine | ||
| # start aborts before graph capture. Size the scheduler batch to the sweep point | ||
| # instead; the accuracy eval serves up to 256 concurrent requests. | ||
| MAX_NUM_SEQS=$(( CONC > 16 ? CONC : 16 )) | ||
| if [[ "${EVAL_ONLY:-false}" == true ]]; then | ||
| MAX_NUM_SEQS=256 | ||
| fi | ||
|
|
||
| # Pyxis shares the host network; port 8888 can already belong to a host service. | ||
| select_available_server_port | ||
|
|
||
| # Probabilistic draft sampling measured ~23% faster than greedy on the drafter's | ||
| # card. Adaptive verification is rejected by vLLM's GDN attention backend for | ||
| # this hybrid architecture, so it stays at its default (off). | ||
| SPEC_CONFIG=$(printf '{"method":"dspark","model":"%s","num_speculative_tokens":%d,"draft_sample_method":"probabilistic"}' "$DRAFT_MODEL" "$NUM_SPEC_TOKENS") | ||
|
|
||
| start_gpu_monitor | ||
|
|
||
| VLLM_CMD=( | ||
| vllm serve "$MODEL" --served-model-name "$MODEL" | ||
| --host 0.0.0.0 --port "$PORT" | ||
| --tensor-parallel-size 1 | ||
| # Text-only serving: skip the vision tower of Qwen3_5ForConditionalGeneration. | ||
| --language-model-only | ||
| --trust-remote-code | ||
| --kv-cache-dtype fp8 | ||
| --max-model-len "$MODEL_LEN" | ||
| --max-num-seqs "$MAX_NUM_SEQS" | ||
| # Every 1k1k request prefills its full random prompt; no prefix-cache hits. | ||
| --no-enable-prefix-caching | ||
| --reasoning-parser qwen3 | ||
| --enable-auto-tool-choice --tool-call-parser qwen3_xml | ||
| --speculative-config "$SPEC_CONFIG" | ||
| --disable-uvicorn-access-log | ||
| ) | ||
| printf '%q ' "${VLLM_CMD[@]}" | tee /workspace/vllm_command.txt | ||
| printf '\n' | tee -a /workspace/vllm_command.txt | ||
| "${VLLM_CMD[@]}" > "$SERVER_LOG" 2>&1 & | ||
| SERVER_PID=$! | ||
|
|
||
| wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" | ||
|
|
||
| if [[ "${EVAL_ONLY:-false}" == true ]]; then | ||
| run_eval --framework lm-eval --port "$PORT" | ||
| else | ||
| pip install -q datasets pandas | ||
| run_benchmark_serving \ | ||
| --model "$MODEL" \ | ||
| --port "$PORT" \ | ||
| --backend vllm \ | ||
| --input-len "$ISL" \ | ||
| --output-len "$OSL" \ | ||
| --random-range-ratio "$RANDOM_RANGE_RATIO" \ | ||
| --num-prompts "$((CONC * 10))" \ | ||
| --max-concurrency "$CONC" \ | ||
| --result-filename "$RESULT_FILENAME" \ | ||
| --result-dir /workspace/ \ | ||
| `# Chat-templated prompts: raw random tokens tank draft acceptance.` \ | ||
| --use-chat-template \ | ||
| --server-pid "$SERVER_PID" | ||
| if [[ "${RUN_EVAL:-false}" == true ]]; then | ||
| run_eval --framework lm-eval --port "$PORT" | ||
| append_lm_eval_summary | ||
| fi | ||
| fi | ||
|
|
||
| stop_gpu_monitor | ||
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
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
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.
🟡 (optional) This script silently defaults MAX_MODEL_LEN instead of validating it, violating the mandatory "no fallback defaults for caller-supplied config" rule in AGENTS.md.
MODEL_LEN="${MAX_MODEL_LEN:-$((ISL + OSL + 256))}"uses the forbidden${VAR:-default}pattern on MAX_MODEL_LEN, which is not in thecheck_env_varslist at line 9, even though the matrix generator (infx/matrix/generate.py:836,847) always forwards MAX_MODEL_LEN as a required field for every fixed-seq-len entry. Fix: add MAX_MODEL_LEN to check_env_vars and consume$MAX_MODEL_LENdirectly (asqwen3.5_fp4_b200_trt_mtp.shdoes), rather than silently recomputing a default when it is missing/unset, so a caller misconfiguration fails loudly instead of masking it.Extended reasoning...
AGENTS.md's Bash conventions explicitly forbid
${VAR:-default}for caller-supplied configuration and require every required input be validated with check_env_vars before use. infx/matrix/generate.py always setsmax-model-len: isl + osl + 256(lines 836 and 847) for every fixed-seq-len row (both single-node and multi-node), and infx/matrix/validation.py:181,274 marks max_model_len as a required Pydantic field, so MAX_MODEL_LEN is genuinely caller-supplied, not optional. The new script never validates it and instead falls back silently at line 38:MODEL_LEN="${MAX_MODEL_LEN:-$((ISL + OSL + 256))}". Compare to the established pattern in qwen3.5_fp4_b200_trt_mtp.sh:5-11, which lists MAX_MODEL_LEN in check_env_vars and then uses/bounds it directly (MAX_MODEL_LEN=$(( MAX_MODEL_LEN > 8192 ? MAX_MODEL_LEN : 8192 ))), never defaulting it. If the caller ever fails to forward MAX_MODEL_LEN (a launcher bug, a manual invocation, a future refactor of the multinode/single-node code path), this script masks that misconfiguration instead of failing clearly like check_env_vars would, silently…Verification: nit. The candidate is factually correct that this deviates from AGENTS.md's mandatory Bash conventions, but the severity is nit, not normal — no runtime failure is reachable. Line 38 of the new script uses the forbidden fallback pattern on a caller-supplied field:
MODEL_LEN="${MAX_MODEL_LEN:-$((ISL + OSL + 256))}", andcheck_env_varsat line 9 (MODEL TP CONC ISL OSL RANDOM_RANGE_RATIO…