Skip to content

Switch FP8 per tensor quant to use torch._scaled_mm#44864

Closed
SunMarc wants to merge 6 commits intomainfrom
fp8-per-tensor
Closed

Switch FP8 per tensor quant to use torch._scaled_mm#44864
SunMarc wants to merge 6 commits intomainfrom
fp8-per-tensor

Conversation

@SunMarc
Copy link
Copy Markdown
Member

@SunMarc SunMarc commented Mar 19, 2026

What does this PR do?

This PR switches FP8 per-tensor implementation to rely on the official torch impl torch._scaled_mm. Note that torch._scaled_mm don't explicitly support per tensor. We hack the api a bit as it only support per row.
It is actually faster than the hotfix we did with the existing triton kernels that were used for block quantization (128,128).

Will add some benchmark.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@SunMarc SunMarc closed this Mar 20, 2026
@SunMarc
Copy link
Copy Markdown
Member Author

SunMarc commented Mar 20, 2026

Closing in favor of #44895

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.

2 participants