-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[gpt-oss] Enable gpt-oss on ampere #22714
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
Conversation
Signed-off-by: Yongye Zhu <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
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.
Code Review
This pull request enables mxfp4 quantization on Ampere GPUs and introduces logic to select the Triton attention backend when attention sinks are utilized. The change to support Ampere by lowering the minimum compute capability is correct. However, I've identified a critical issue in the new attention backend selection logic. It unconditionally selects the Triton backend when sinks are present, without verifying if the backend supports the current model's configuration (e.g., head size, data type). This could lead to runtime errors. My review includes a suggested fix to add the necessary support check before selecting the backend.
if has_sink: | ||
logger.info_once("Using Triton backend on V1 engine.") | ||
return TRITON_ATTN_VLLM_V1 |
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 code unconditionally selects the Triton backend if has_sink
is true, without checking if the current configuration (e.g., head_size
, dtype
) is supported by the Triton backend. This could lead to a runtime error if an unsupported configuration is used. It's crucial to verify backend support before selecting it, similar to how it's done for FLASH_ATTN_V1
just below this block.
if has_sink: | |
logger.info_once("Using Triton backend on V1 engine.") | |
return TRITON_ATTN_VLLM_V1 | |
if has_sink: | |
if is_attn_backend_supported(TRITON_ATTN_VLLM_V1, | |
head_size, | |
dtype, | |
allow_import_error=False): | |
logger.info_once("Using Triton backend on V1 engine.") | |
return TRITON_ATTN_VLLM_V1 | |
else: | |
logger.warning_once( | |
"Triton backend is not supported with sink for this " | |
"configuration, falling back to the default backend." | |
) |
Signed-off-by: Yongye Zhu <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]>
Head branch was pushed to by a user without write access
Signed-off-by: Yongye Zhu <[email protected]> Signed-off-by: Paul Pak <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Yongye Zhu <[email protected]>
gpt-oss-20b output