-
Notifications
You must be signed in to change notification settings - Fork 156
Docs: require --use-chat-template in MTP scripts #1079
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
+1
β0
Merged
Changes from all commits
Commits
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
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.
π‘ The new MTP rule only references the
*_mtp.shnaming convention, but multi-node AMD MTP benchmarks use a different pattern:server.shexportsIS_MTP=truewhenDECODE_MTP_SIZE > 0, andbench.shconditionally adds--use-chat-templatebased on that variable. A developer adding a new multi-node AMD MTP configuration (not named*_mtp.sh) would read this rule and likely conclude it doesn't apply. Consider expanding the rule to mention both patterns.Extended reasoning...
Two distinct MTP patterns exist in the codebase, but the rule only documents one.
The newly added rule states: "This applies to every
*_mtp.shscript regardless of model, precision, or runner." This accurately describes the single-node benchmark pattern (e.g.,dsr1_fp8_b200_mtp.sh) where scripts are explicitly named with the_mtpsuffix and must callrun_benchmark_servingwith--use-chat-templatedirectly.However, multi-node AMD MTP benchmarks follow a completely different mechanism. In
benchmarks/multi_node/amd_utils/server.sh(lines 459β463),IS_MTP=trueis exported whenDECODE_MTP_SIZE > 0. Then inbench.sh(line 60),--use-chat-templateis conditionally injected via$( [ "$IS_MTP" = "true" ] && echo "--use-chat-template" ). These scripts are named things likedsr1_fp8_mi355x_sglang-disagg.shβ they do not match*_mtp.sh.Why the refutation is partially valid but incomplete: The refutation correctly observes that the existing
bench.shinfrastructure already handles--use-chat-templateautomatically for multi-node AMD MTP configurations, meaning no current script is broken. However, this only holds for scripts that reusebench.sh. A developer writing a new multi-node AMD MTP script that doesn't route throughbench.sh, or who is setting up theIS_MTP=truedispatch chain for the first time, could read AGENTS.md, see their script isn't named*_mtp.sh, and not realize the requirement applies.Concrete scenario: Developer adds a new multi-node AMD MTP configuration and writes a custom launch wrapper that calls
run_benchmark_servingdirectly (bypassingbench.sh). They check AGENTS.md and see: "This applies to every*_mtp.shscript" β their script is not named*_mtp.sh, so they move on without adding--use-chat-template. The acceptance rate silently collapses, producing misleading benchmark numbers β exactly the failure mode the rule intends to prevent.Suggested fix: Expand the final sentence to cover both patterns, e.g.: "This applies to every
*_mtp.shscript AND to any script whereIS_MTP=trueis set (the multi-node AMD MTP pattern), regardless of model, precision, or runner."