add mxfp8 and nvfp4 support to safetensors#3668
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3668
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8bd3bbc with merge base 561b50b ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
7efe69d to
7567bd1
Compare
|
I see, cc @vkuzo should we just change all the attribute names to be public? e.g. ao/torchao/prototype/mx_formats/nvfp4_tensor.py Lines 68 to 74 in 220fedc |
sounds good, as long as we are clear there is no BC on this as its in prototype |
|
yeah it's clear I think, since these are imported from prototype folder. @liangel-02 maybe first open a PR to change these names first, then we can remove the workaround in this PR |
7567bd1 to
7bcee49
Compare
c94be30 to
07650dd
Compare
07650dd to
8bd3bbc
Compare
jerryzh168
left a comment
There was a problem hiding this comment.
changes looks good, please add test with checkpoints as well to make sure it works e2e (can either upload to https://huggingface.co/torchao-testing or just test with personal id)
@jerryzh168 i uploaded both checkpoints to https://huggingface.co/torchao-testing, see https://huggingface.co/torchao-testing/Qwen3-8B-NVFP4-safetensors and https://huggingface.co/torchao-testing/Qwen3-8B-MXFP8-safetensors. merging now! |
|
@liangel-02 thanks, please update the model card of these checkpoints on repro instructions as well: https://huggingface.co/torchao-testing/Qwen3-8B-NVFP4-safetensors, example: https://huggingface.co/torchao-testing/opt-125m-Float8WeightOnlyConfig-v2-0.15.0 |
As title.