quantization: complete MXFP4 and NVFP4#25878
Open
misfit-alpaca wants to merge 1 commit into
Open
Conversation
This PR/commit implements dense MXFP4 support (all tensors), and MoE NVFP4 (similar to MXFP4). It implements the quantization routine for all of these types.
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.
This PR/commit implements dense MXFP4 support (all tensors), and MoE NVFP4 (similar to MXFP4). It also implements the quantization routine for these types:
Overview
See above.
More specifically, it also adds
NVFP4_MOEandMXFP4quantization types which are new. The engine could already process these but with warnings, and this also is fixed.Additional information
I found NVFP4 on my hardware to be decently fast. I'm using an i3 14100 with OpenBLAS on musl libc, with 8 GB DDR5.
Unlike other implementations of finished MXFP4 and NVFP4 support, this gives the best of all the worlds. People who want a dense MXFP4 get it, people who want MoE NVFP4 get it, and now people can have NVFP4 too. This PR kills multiple birds with one stone.
Requirements