Repository navigation
Add MiniMax-M3 NVFP4 B200 TensorRT-LLM AgentX with EAGLE3-GQA MTP / 新增 MiniMax-M3 NVFP4 B200 TensorRT-LLM AgentX EAGLE3-GQA MTP 配置 - #2659
Conversation
|
Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase For PR verification, add the PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs 感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 如需进行 PR 验证,请为此 PR 添加 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档 |
1 similar comment
|
Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase For PR verification, add the PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs 感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 如需进行 PR 验证,请为此 PR 添加 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档 |
There was a problem hiding this comment.
Beyond the inline findings, a few other candidates were examined and ruled out: the unused NUM_SPEC_TOKENS variable is a real quality nit but harmless today; kv_cache_config always reserving DRAM host cache regardless of KV_OFFLOADING/KV_OFFLOAD_BACKEND matches the script's own documented intent (values come from the master config, host_cache_size is pinned per-topology); the unreachable MAX_BATCH==50/55 branches and per-value CAPTURE_BATCH_LIST hardcoding are style-only and match the search space actually configured in nvidia-master.yaml.
Extended reasoning...
These four items were raised by finder agents and refuted by verifiers as not being functional bugs — recording them here so they aren't re-explored from scratch in a future pass. This is informational only and doesn't change the review outcome; the inline findings (missing thinking_mode chat-template override and the unlocked concurrent draft-model download race) already warrant human review.
| speculative_model: $DRAFT_MODEL_PATH | ||
| scheduler_config: | ||
| capacity_scheduler_policy: MAX_UTILIZATION | ||
| enable_chunked_prefill: true | ||
| enable_autotuner: true | ||
| trust_remote_code: true | ||
| reasoning_parser: minimax_m3 |
There was a problem hiding this comment.
🔴 The server config sets reasoning_parser: minimax_m3 but never enables thinking mode, even though the pinned TLLM_SPEC_DECODE_FORCE_NUM_ACCEPTED_TOKENS=1.78 targets the thinking_on[3] golden AL curve (per the script's own comment at line 21). Every other MiniMax-M3 agentic MTP script in the repo (b200/b300/mi355x/h100/h200/mi300x/mi325x) pairs its reasoning parser with an explicit thinking_mode: enabled chat-template override; add the trtllm-serve equivalent (e.g. chat_template_kwargs in ser.yaml) so EVAL_ONLY accuracy runs don't silently execute thinking-off.
Extended reasoning...
reasoning_parser: minimax_m3 in ser.yaml only controls how the server parses a completed response into reasoning_content vs. regular content — it has no effect on whether the model actually generates a thinking block. Whether thinking is generated is controlled entirely by the chat template kwargs baked into the request, and this script never sets one, so requests go out under MiniMax-M3's chat-template default rather than an explicit thinking-on directive.
That distinction matters here because the script explicitly targets a thinking-on golden acceptance length. The comment at line 21 pins the GQA draft head's target to golden_al_distribution/minimaxm3_eagle3_gqa.yaml minimax-m3.thinking_on[3], and the throughput path (lines 159-161) forces TLLM_SPEC_DECODE_FORCE_NUM_ACCEPTED_TOKENS=1.78 to hit that pinned AL of 2.78. That forcing only overrides the reported acceptance-length metric for throughput; it does nothing for EVAL_ONLY=true runs, which explicitly unset the env var (line 163) so the verifier measures the model's real behavior. If the request template defaults to thinking-off, EVAL_ONLY accuracy numbers would reflect a different generation mode than the one the golden AL — and every sibling engine config for this model — is built around.
The strongest evidence that the template does not default to thinking-on is the repo's own precedent: all seven other MiniMax-M3 agentic MTP scripts (minimaxm3_fp4_b200_mtp.sh:191, minimaxm3_fp4_b300_mtp.sh:99, minimaxm3_fp4_mi355x_mtp.sh:220, minimaxm3_fp8_h100_mtp.sh:138, minimaxm3_fp8_h200_mtp.sh:188, minimaxm3_fp8_mi300x_mtp.sh:175, minimaxm3_fp8_mi325x_mtp.sh:88) pass both --reasoning-parser minimax_m3 and --default-chat-template-kwargs '{"thinking_mode":"enabled"}'. Several of those are vLLM configs that don't even override the chat template file, yet they still bother to force thinking_mode: enabled — if the model's built-in template already defaulted to thinking-on, that flag would be redundant across every single one of these configs. It clearly is not redundant, and this new trtllm-serve script is missing its equivalent.
Concretely: (1) the agentic replay client (per benchmark_lib.sh's build_replay_cmd and the documented behavior in glm5.2_fp4_b200_sglang_mtp.sh:343) sends no chat_template_kwargs of its own — thinking mode is decided entirely server-side by the default kwargs baked into the launch config; (2) this script's ser.yaml sets reasoning_parser: minimax_m3 and nothing else related to thinking; (3) therefore every request in this recipe renders with MiniMax-M3's built-in template default, whatever that is; (4) since all seven sibling configs override it to enabled, the default is very unlikely to already be thinking-on, so this recipe is very likely running thinking-off; (5) that contradicts the recipe's own pinned thinking-on golden AL basis and makes the throughput/accuracy numbers non-comparable to every sibling engine config for this model.
Fix: add the trtllm-serve equivalent of the sibling override — e.g. a chat_template_kwargs: {thinking_mode: enabled} entry in ser.yaml, or the appropriate trtllm-serve CLI/config knob for default per-request template kwargs — so requests are forced into the thinking-on mode the AL target and MTP config were designed around, matching every other MiniMax-M3 recipe in the repo.
| # Golden AL for the GQA draft head: golden_al_distribution/minimaxm3_eagle3_gqa.yaml | ||
| # minimax-m3.thinking_on[3]. | ||
|
|
||
| if [[ -n "${SLURM_JOB_ID:-}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}" | ||
| fi | ||
|
|
||
| if [[ -n "${MODEL_PATH:-}" ]]; then | ||
| if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then | ||
| hf download "$MODEL" --local-dir "$MODEL_PATH" | ||
| fi | ||
| DRAFT_MODEL_PATH="/lustre/fsw/gharunners/models/${DRAFT_MODEL##*/}" | ||
| if [[ ! -d "$DRAFT_MODEL_PATH" || -z "$(ls -A "$DRAFT_MODEL_PATH" 2>/dev/null)" ]]; then | ||
| mkdir -p "$DRAFT_MODEL_PATH" | ||
| hf download "$DRAFT_MODEL" --local-dir "$DRAFT_MODEL_PATH" | ||
| fi |
There was a problem hiding this comment.
🔴 The new script hardcodes the shared EAGLE3-GQA draft path (/lustre/fsw/gharunners/models/MiniMax-M3-EAGLE3-GQA) and guards its download with only an unlocked ls -A emptiness check. Since the master-config search space allocates 11 separate jobs (9 tp4 + 2 tp8 conc points) against this same path, a cold-cache sweep can race: one job's partial download can be seen as "non-empty" and accepted by another job, which then launches trtllm-serve against a corrupt/incomplete draft and crashes in the loader. Fix by mirroring the sibling minimaxm3_fp4_b200_mtp.sh, which uses checkpoint_is_complete (shard-level check) plus flock for exactly this shared-path scenario, or by staging the draft per-job as that sibling does for its DRAFT_MODEL_PATH.
Extended reasoning...
This script stages the EAGLE3-GQA speculative-decoding draft head into DRAFT_MODEL_PATH=/lustre/fsw/gharunners/models/${DRAFT_MODEL##*/} whenever MODEL_PATH is preset (the b200-dgxc runner branch), and the only guard before mkdir -p "$DRAFT_MODEL_PATH" + hf download "$DRAFT_MODEL" --local-dir "$DRAFT_MODEL_PATH" is:
if [[ ! -d "$DRAFT_MODEL_PATH" || -z "$(ls -A "$DRAFT_MODEL_PATH" 2>/dev/null)" ]]; thenThat path is not per-job: configs/nvidia-master.yaml defines this recipe's search space as 9 tp: 4 conc points plus 2 tp: 8 conc points (11 total), and every one of those allocations resolves to the identical /lustre/fsw/gharunners/models/MiniMax-M3-EAGLE3-GQA directory on the shared Lustre filesystem. There is no flock, no lockfile, and no re-check after any wait.
The sibling script benchmarks/single_node/agentic/minimaxm3_fp4_b200_mtp.sh was written to handle exactly this shape of problem for its shared MODEL_PATH checkpoint. Its comment states the concurrency model explicitly: "Every concurrency of this sweep runs as its own allocation against the same shared path, so serialize." It wraps the download in flock -w "${MODEL_DOWNLOAD_LOCK_TIMEOUT:-21600}" 9, and re-checks checkpoint_is_complete both before and after acquiring the lock. It also documents precisely why a bare ls -A check is unsafe: "A non-empty directory is NOT a staged checkpoint: an aborted pull leaves config.json and friends behind with no weights, and an ls -A guard accepts it, so the cell skips the download and dies later inside the loader." For its own DRAFT_MODEL_PATH, that sibling sidesteps the whole problem by staging the draft in a per-job container-overlay path (dirname "$MODEL_PATH") rather than a shared one, so no lock is even needed there.
The new trtllm script reproduces the exact anti-pattern the sibling was written to avoid: a shared path, multiple concurrent allocations, and a naive ls -A check instead of a shard-completeness check.
Step-by-step failure scenario on a cold cache (draft not yet staged anywhere):
- The sweep launches all 11 search-space allocations (9 tp4 + 2 tp8) around the same time, each as its own Slurm job/container.
- Job A evaluates the guard, sees
$DRAFT_MODEL_PATHmissing, runsmkdir -pand startshf download.hfmaterializesconfig.json/.cache/huggingfacebefore the weight shards finish transferring. - Job B evaluates the guard microseconds-to-seconds later, sees the directory now exists and
ls -Areturns non-empty (config.json / partial files from Job A), and skips its own download entirely — even though the draft head is incomplete. - Job B proceeds to write
speculative_config.speculative_model: $DRAFT_MODEL_PATHintoser.yamland startstrtllm-serve, which loads the speculative model from that same directory. Since the weights aren't fully present, the loader either crashes outright or (worse) loads a truncated/corrupted draft checkpoint, producing bad results silently. - Meanwhile Job A's own
hf downloadmay also be disrupted by Job B (or other jobs C-K) concurrently writing/mkdir'ing into the same--local-dir, sincehf downloadprovides no cross-process coordination guarantee for concurrent writers targeting the same destination.
This is timing-dependent and only manifests on a cold cache (first run after the draft head isn't staged yet), so reruns after the draft is fully staged will self-heal since the ls -A check then correctly sees a populated directory. But on the first sweep run with 11 concurrent allocations racing on the same shared Lustre path, this is a realistic way to lose one or more sweep cells to a loader crash, exactly the class of bug the sibling script's checkpoint_is_complete + flock combo was built to prevent.
Fix: reuse the sibling's checkpoint_is_complete function (shard-level check against model.safetensors.index.json, with single-file fallback) combined with flock around the mkdir -p + hf download, or alternatively stage DRAFT_MODEL_PATH per-job (e.g. under dirname "$MODEL_PATH" inside the container overlay) as the sibling does, which avoids the shared-path race entirely.
| check_env_vars MODEL TP CONC KV_OFFLOADING TOTAL_CPU_DRAM_GB RESULT_DIR DURATION EVAL_ONLY | ||
|
|
||
| DRAFT_MODEL="Inferact/MiniMax-M3-EAGLE3-GQA" | ||
| NUM_SPEC_TOKENS=3 |
There was a problem hiding this comment.
🟡 NUM_SPEC_TOKENS=3 is declared at line 19 but never referenced — speculative_config.max_draft_len in the ser.yaml heredoc hardcodes the literal 3 instead of interpolating $NUM_SPEC_TOKENS. The sibling vLLM script (minimaxm3_fp4_b200_mtp.sh) threads this variable into its spec config so the draft length lives in one place; here the two values can silently drift if either is changed independently. Consider either interpolating max_draft_len: $NUM_SPEC_TOKENS or dropping the unused declaration.
Extended reasoning...
What the bug is: benchmarks/single_node/agentic/minimaxm3_fp4_b200_trt_mtp.sh declares NUM_SPEC_TOKENS=3 at line 19, but a grep of the file shows this is the only occurrence — the variable is never read anywhere else in the script. Meanwhile, the speculative_config block inside the ser.yaml heredoc (around line 129) sets max_draft_len: 3 as a bare literal rather than max_draft_len: \$NUM_SPEC_TOKENS.
Code path: The heredoc cat << EOF > ser.yaml ... EOF performs normal shell variable interpolation, so any \$VAR reference inside it would be substituted at script-generation time. Since max_draft_len uses the literal 3 instead, the connection between the declared spec-token count and the actual TRT-LLM speculative-decoding config is purely coincidental — the two numbers happen to match today only because both were manually set to 3.
Why existing code doesn't prevent it: There's no lint or CI check enforcing that declared config variables are consumed, and shell scripts don't warn on unused variables by default. The sibling vLLM script minimaxm3_fp4_b200_mtp.sh does this correctly — it threads NUM_SPEC_TOKENS into its SPEC_CONFIG string — so this script is the outlier within the same family of recipes.
Impact: Purely a maintainability/quality issue, not a functional bug in this PR as merged (both values are 3, so behavior is correct today). But it creates a latent drift risk: if a future maintainer bumps NUM_SPEC_TOKENS to test a different EAGLE3-GQA draft length, they would reasonably expect the config to follow, but max_draft_len would silently stay at 3, running an unintended speculative configuration without any error.
Step-by-step proof:
grep -n NUM_SPEC_TOKENS benchmarks/single_node/agentic/minimaxm3_fp4_b200_trt_mtp.shreturns only line 19 (NUM_SPEC_TOKENS=3) — no other match in the file.- Inspecting the
speculative_configblock in the heredoc showsmax_draft_len: 3written as a literal, not\$NUM_SPEC_TOKENS. - If a maintainer later edits line 19 to
NUM_SPEC_TOKENS=4(e.g., to test a longer draft chain), the generatedser.yamlstill containsmax_draft_len: 3, so the change has zero effect on the actual server config — a silent no-op that could waste a benchmarking cycle before anyone notices the config never changed.
Fix: Replace the literal in the heredoc with max_draft_len: \$NUM_SPEC_TOKENS so the two stay in sync, matching the pattern already used in the sibling vLLM script. Alternatively, if the variable truly serves only as inline documentation, drop the declaration to avoid implying it's load-bearing.
| else | ||
| hf download "$MODEL" | ||
| export MODEL_PATH="$MODEL" | ||
| hf download "$DRAFT_MODEL" | ||
| DRAFT_MODEL_PATH="$DRAFT_MODEL" |
There was a problem hiding this comment.
🟡 In the else-branch (used when MODEL_PATH isn't preset by the runner), hf download "$MODEL" has no --local-dir, so weights land in the HF hub cache rather than a named directory, and MODEL_PATH is then set to the bare repo-id string nvidia/MiniMax-M3-NVFP4. Later, --chat_template "$MODEL_PATH/chat_template.jinja" (line 176) builds a nonexistent relative path, so trtllm-serve fails to load the chat template on this manual/local-repro path. Production is unaffected because runners/launch_b200-dgxc.sh always presets MODEL_PATH to a real directory, but the else-branch is real, reachable code that is broken as written.
Extended reasoning...
The bug: In benchmarks/single_node/agentic/minimaxm3_fp4_b200_trt_mtp.sh, lines 36-40 handle the case where MODEL_PATH was not preset by the caller:
else
hf download "$MODEL"
export MODEL_PATH="$MODEL"
hf download "$DRAFT_MODEL"
DRAFT_MODEL_PATH="$DRAFT_MODEL"
fihf download "$MODEL" with no --local-dir places the snapshot under the HF hub cache (a hashed path like ~/.cache/huggingface/hub/models--nvidia--MiniMax-M3-NVFP4/snapshots/<hash>/), not under a directory literally named nvidia/MiniMax-M3-NVFP4. Immediately after, the script does export MODEL_PATH="$MODEL", which sets MODEL_PATH to the bare repo-id string nvidia/MiniMax-M3-NVFP4 — not the actual cache directory that was just populated.
Where it breaks: Later, line 176 builds the server invocation:
trtllm-serve "$MODEL_PATH"
...
--chat_template "$MODEL_PATH/chat_template.jinja"With MODEL_PATH=nvidia/MiniMax-M3-NVFP4, this concatenates to --chat_template nvidia/MiniMax-M3-NVFP4/chat_template.jinja, a relative filesystem path with no such nested directory under the process's CWD. --chat_template expects a real, loadable local file (or an inline template string) — it does not resolve HF-repo-relative paths — so trtllm-serve fails to find/load the chat template and errors out before serving.
Why nothing else catches this: The if-branch (MODEL_PATH preset) is correct, since hf download --local-dir "$MODEL_PATH" actually populates that directory including chat_template.jinja. In production this branch is the only one exercised, because runners/launch_b200-dgxc.sh always presets MODEL_PATH to a real path (e.g. /scratch/fsw/models/MiniMax-M3-NVFP4) for this recipe, so CI/sweep runs never touch the else-branch. But the else-branch exists specifically to support manual/local reproduction without the runner, and as written it is broken. Cross-checking the sibling TRT-LLM agentic scripts (e.g. the dsv4 B300 TRT scripts) shows the same 'export MODEL_PATH=$MODEL' fallback idiom is safe there only because those scripts don't derive a filesystem chat-template path from MODEL_PATH — this is the only script in the sweep that does so, making the failure unique to this file.
Step-by-step proof:
- Caller invokes the script without pre-setting
MODEL_PATH(e.g. a developer manually reproducing the recipe locally, per the else-branch's evident purpose). [[ -n "${MODEL_PATH:-}" ]]is false, so the else-branch runs:hf download "nvidia/MiniMax-M3-NVFP4"downloads weights into the HF hub cache (not a directory named after the repo).export MODEL_PATH="$MODEL"setsMODEL_PATH=nvidia/MiniMax-M3-NVFP4(a repo-id string, not a filesystem path to real content).- At line 176,
--chat_template "$MODEL_PATH/chat_template.jinja"expands to--chat_template nvidia/MiniMax-M3-NVFP4/chat_template.jinja. - Relative to the script's CWD, no directory tree
nvidia/MiniMax-M3-NVFP4/exists, so this path does not resolve to a file on disk. trtllm-servefails to load the chat template and the server does not start correctly.
Fix: Either download to a real local directory in the else-branch too (e.g. export MODEL_PATH="$(hf download "$MODEL")" to capture the resolved local snapshot path, or use --local-dir with a deterministic path derived from the repo id), or avoid building a filesystem path from MODEL_PATH for the chat template (e.g. resolve the actual snapshot directory via hf download's printed path, or use a repo-relative chat_templates path like the sibling sglang/vllm scripts do).
|
/stage-results 32186776214 |
|
@functionstackx staged run 32186776214: https://inferencemax-app-git-staging-semianalysisai.vercel.app/inference?i_dates=2026-08-18~r32186776214 This run remains available across future |
|
/reuse-sweep-run |
# Conflicts: # perf-changelog.yaml
…202611040839 / Kimi-K3 ATOM 单机切换到 rocm/atom-dev:nightly_202611040839 - amd-master image nightly_202611021458 (ATOM 974414f16) -> nightly_202611040839 (ATOM 16ebac2eb); the recipe frontend is pinned to its digest sha256:c4d109f0846bc49af9b21e3acfe3ee70df87c230ee71a4affed677aeb890e98b. - 16ebac2eb keeps every change the entry cites (ROCm/ATOM#2626, #2659, #2841, #2849, #2871; its aiter f60ee45dd contains ROCm/aiter#7020) and adds ROCm/ATOM#2902 (chunked Kimi-K3 image prefills) and #2910 (reply returned as content when Kimi-K3 writes it inside its think channel). - The changelog entry's image line says so. - amd-master 镜像 nightly_202611021458(ATOM 974414f16)改为 nightly_202611040839(ATOM 16ebac2eb);配方 frontend 固定为其 digest sha256:c4d109f0846bc49af9b21e3acfe3ee70df87c230ee71a4affed677aeb890e98b。 - 16ebac2eb 保留条目中引用的全部改动(ROCm/ATOM#2626、#2659、#2841、#2849、#2871;其 aiter f60ee45dd 包含 ROCm/aiter#7020),并新增 ROCm/ATOM#2902(Kimi-K3 图像 prefill 分块)和 #2910(Kimi-K3 在 think 通道内写回复时作为 content 返回)。 - changelog 条目的镜像描述已同步更新。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Description
Adds
minimaxm3-fp4-b200-trtllm-agentic-mtp— MiniMax-M3 NVFP4 on B200, single-node TensorRT-LLM AgentX with EAGLE3-GQA speculative decoding.新增
minimaxm3-fp4-b200-trtllm-agentic-mtp:B200 上 MiniMax-M3 NVFP4 单节点 TensorRT-LLM AgentX 配置,启用 EAGLE3-GQA 投机解码。Image:
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc23.post1Type of Change
Checklist
perf-changelog.yamland have not edited historical entriesOWNER/MEMBER/COLLABORATOR) has commented/reuse-sweep-runon this PR