Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2881
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit c4e9165 with merge base 2f78cfe ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
jerryzh168
reviewed
Aug 26, 2025
torchao/prototype/quantization/QuantizeTensorToFloat8KwargsJSON.py
Outdated
Show resolved
Hide resolved
jerryzh168
reviewed
Aug 26, 2025
torchao/prototype/quantization/QuantizeTensorToFloat8KwargsJSON.py
Outdated
Show resolved
Hide resolved
jerryzh168
reviewed
Aug 27, 2025
jerryzh168
reviewed
Aug 27, 2025
jerryzh168
reviewed
Aug 27, 2025
jerryzh168
reviewed
Aug 27, 2025
jerryzh168
reviewed
Aug 28, 2025
jerryzh168
reviewed
Aug 28, 2025
jerryzh168
reviewed
Aug 28, 2025
Comment on lines
+9
to
+11
| from torchao.quantization import Float8Tensor | ||
| from torchao.quantization.quantize_.common import KernelPreference | ||
| from torchao.quantization.quantize_.workflows import QuantizeTensorToFloat8Kwargs |
Contributor
There was a problem hiding this comment.
looks like some imports are not used?
Contributor
Author
There was a problem hiding this comment.
these are used to create the ALLOWED_CLASSES dict
mikaylagawarecki
approved these changes
Aug 28, 2025
mikaylagawarecki
left a comment
There was a problem hiding this comment.
Thanks for restricting to ALLOWED_CLASSES
jerryzh168
reviewed
Aug 28, 2025
jerryzh168
reviewed
Aug 28, 2025
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.
Context
Currently we serialize and distribute torchao quantized model with pytorch native APIs, specifically
torch.save(model.state_dict())andmodel.load_state_dict(state_dict, assign=True)Summary
This PR builds out the functionality
save_tensor_subclass_dictandload_tensor_subclass_dictusingsave_fileandload_filefrom safetensors library for FP8 based off of the script here.Test Plan
Outputs match after saving/loading model.state_dict()