Repository navigation
finegrained-kernels: add FP8 weight-only inference - #1241
Open
IlyasMoutawwakil wants to merge 27 commits into
Open
IlyasMoutawwakil wants to merge 27 commits into
IlyasMoutawwakil wants to merge 27 commits into
Conversation
|
This PR changes source code for the following kernel(s): If you have the kernel-bot build permissions, then trigger |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds FP8 weight-only inference through
activation_format="bf16"for dense, batched, grouped and MoE entrypoints, with per-tensor or coarse-block weight scales and BF16/FP16 activations. This covers ModelOpt'sFP8_PB_WOrecipe.Matched B200 CUDA-graph checks, including dequantization:
These use block128 scales and bounded tuning, and are microbenchmarks rather than full-model throughput. Stronger tuning made 512-token dense calls effectively tied, motivating the conservative threshold. Compiled native Torch remains competitive: 616 µs versus 633 µs for the large dense case, and can still win decode.
Extends the existing main benchmark with eager/compiled runtime-dequantization baselines, resident-BF16 dense controls and optional vLLM Marlin comparisons. Tests reuse
Problem/MoEProblem; no separate weight-only test framework. Existing operator/MoE suites and focused final-source compilation, CUDA-graph, autocast and output-dtype checks pass.Related issue
Requested by a maintainer for huggingface/transformers#49658.
Checklist