Skip to content

Comments

[vllm] Use triton for vllm fp8#507

Open
Datta0 wants to merge 1 commit intounslothai:mainfrom
Datta0:vllm_fp8_deepgemm_toggle
Open

[vllm] Use triton for vllm fp8#507
Datta0 wants to merge 1 commit intounslothai:mainfrom
Datta0:vllm_fp8_deepgemm_toggle

Conversation

@Datta0
Copy link
Collaborator

@Datta0 Datta0 commented Feb 20, 2026

It is noticed that deepgemm is slower (for at least B200) on vLLM
https://x.com/TheZachMueller/status/2024619480580510117?s=20

I was able to see a 10% speed difference in vllm bench throughput command on 1xB200. Note that there maybe other factors at play. This is just beting set for FP8 and B200 so this should be safe

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Datta0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a targeted performance optimization for vLLM when running FP8 quantized models on NVIDIA Hopper GPUs. By explicitly disabling DeepGemm and defaulting to Triton for FP8 operations under these specific conditions, the change aims to mitigate observed performance regressions and improve throughput, as evidenced by recent benchmarks.

Highlights

  • Performance Optimization for FP8 in vLLM: Implemented a conditional environment variable setting (VLLM_USE_DEEP_GEMM='0') to force vLLM to use Triton for FP8 quantized models on Hopper architecture (major_version 10 GPUs), addressing observed performance degradation with DeepGemm.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • unsloth_zoo/vllm_utils.py
    • Added logic to conditionally disable DeepGemm for FP8 models on Hopper GPUs.
Activity
  • No activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces a targeted performance optimization for FP8 models running on NVIDIA's Blackwell architecture. By detecting the GPU's compute capability, it disables vLLM's DeepGEMM in favor of Triton, which has been observed to be faster. The change is well-justified and includes helpful comments. I have one minor suggestion to make the code even more self-documenting by clarifying the magic number used for the architecture check.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02daf42eca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

is_fp8 = "fp8" in model_name.lower() or (quant_method in ("fp8", "fbgemm_fp8"))

if is_fp8:
major_version, minor_version = torch.cuda.get_device_capability()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard FP8 deepgemm toggle behind CUDA checks

load_vllm has explicit non-CUDA paths (including XPU), but this new FP8 branch unconditionally calls torch.cuda.get_device_capability(). On Intel/XPU environments, loading an FP8 model now fails immediately with a CUDA runtime error before vLLM initialization, which is a regression for that code path. Please gate this capability query on DEVICE_TYPE == "cuda" (or use the existing device abstraction) before touching CUDA APIs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant