-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make int8 dynamic quant in autoquant serializable (#1484)
* Make int8 dynamic quant in autoquant serializable Summary: lambda function is not supported for serialization, so we need to reuse the non-lambda functions that already supports serialization: https://github.com/pytorch/ao/blob/00a8d290aab354985fce8c880e1fded22bc48e30/torchao/quantization/quant_api.py#L1263C5-L1268 Note this PR only supports int8 dynamic quant, will need to test and support float8 separately (in H100 machines) Test Plan: Tested locally with transformer push_to_hub: https://huggingface.co/jerryzh168/llama3-8b-autoquant/tree/main Reviewers: Subscribers: Tasks: Tags: * fix * fixes * fix
- Loading branch information
1 parent
00a8d29
commit 3f36c78
Showing
2 changed files
with
15 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,5 @@ repos: | |
alias: ruff-isolated | ||
args: | ||
- --isolated | ||
- select F821,F823,W191 | ||
- --select | ||
- F821,F823,W191 |
This file contains 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