Repository navigation
Conversation
nxphi47
marked this pull request as ready for review
October 14, 2026 19:43
mikasenghaas
added a commit
that referenced
this pull request
Oct 14, 2026
The MXFP8 part of #4095 (stacked on #4092 @ 8b7f7eb) on main, without the blockwise FP8 QAT and FP8 stochastic-rounding work it is stacked on: - MXFP8 QAT for dense projections and routed experts: DeepGEMM per-32 MXFP8 forward, BF16 backward that reuses the forward-rounded weight for input gradients and the BF16 activations for weight gradients. - Deterministic stochastic weight rounding keyed by optimizer step, logical weight and global expert index, so FSDP shards, CP token splits, expert shards and activation-checkpoint replay all draw the same weight sample. - inference.mxfp8_stochastic_weight_rounding: vLLM's online MXFP8 loader casts weights with the same per-32 stochastic cast; activations stay nearest. - deps/prime-kernels at prime-kernels#19 (680681711) for the Triton per-32 MXFP8 quantizer. Its release wheel does not ship it yet: install from source with PRIME_KERNELS=mxfp8. Co-authored-by: Phi <phi@primeintellect.ai> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Add native MXFP8 QAT for dense/grouped projections and routed experts. Forward uses DeepGEMM per-32 MXFP8 GEMMs; backward uses BF16 GEMMs with the forward-rounded weights for input gradients and original BF16 activations for weight gradients.
Add deterministic Triton stochastic weight rounding keyed by step, tensor identity, and global expert offset. Reuse the same weight sample for backward and activation-checkpoint replay. Activations remain nearest-rounded. The vLLM compatibility patch uses that same per-32 cast only in online dense/expert weight loading, including checkpoint reload; serving draws fresh streams independently from training. Add explicit configuration and reject incompatible blockwise-FP8 options for MXFP8.
Stacked on #4092. The kernel submodule pins PrimeIntellect-ai/prime-kernels#19; the release wheel does not yet include MXFP8, so the pinned kernel source must be installed using the repository's source-build workflow.
Validation completed:
Draft pending full-model integration validation. Optimizer and reduction dtypes are unchanged.