-
Notifications
You must be signed in to change notification settings - Fork 357
Make SmoothQuant more General #2728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+574
−750
Merged
Changes from 5 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c482371
Make SmoothQuant more General
namgyu-youn e16edc2
refactor: use predefined ToyLinearModel
namgyu-youn 5ec0dcf
fix incorrect parameters
namgyu-youn 2475ad1
add type hint for dataclass
namgyu-youn ccb7b84
Merge branch 'main' into refactor-smoothquant
namgyu-youn ba89d03
use Quantization API for more generalized SmoothQuant API
namgyu-youn a6df6af
add PREPARE_FOR_LOADING mode for loading quantized weight
namgyu-youn 0fc6539
update example and doc for updated SmoothQuant API
namgyu-youn 46d5d31
remove overused/misunderstood parameters
namgyu-youn fc8ae4d
remove unused variable from SmoothQuant
namgyu-youn 4f7def9
update SmoothQuant docs for user guide
namgyu-youn 0bd922b
add benchmark comparison: base vs smoothquant
namgyu-youn 3552a05
add benchmark: w4a8-dynamic
namgyu-youn 4c2d55c
update docs for a4w8 benchmark
namgyu-youn ef9ab2c
replace Sec/Tokens with Tokens/Sec for metrics
namgyu-youn 0d73344
update docs for SmoothQuant experiment
namgyu-youn 6232f77
fix typo in README
namgyu-youn 1802b5e
rename parser: repo to model
namgyu-youn 0da2189
fix incorrect id: w4a8 -> w8a8
namgyu-youn 7bfcf9c
remove args: precision dtype, `torch.compile`
namgyu-youn e571d5e
rename: precision -> precision dtype in benchmark table
namgyu-youn 0a9ef9e
add args: bias
namgyu-youn 62d986f
fix typo: W4A8 -> W8A8
namgyu-youn 3f8d4ca
fix ci after adding is_bias args
namgyu-youn 65698af
remove dead annotations in args: smoothing_factor
namgyu-youn d06c7ba
remove torch.compile from unittests
namgyu-youn ba58e89
refactor: use ToyLinearModel in AWQ
namgyu-youn b92caac
remove unused test case: dtype, alpha
namgyu-youn 40b3ddb
refactor: parametrize `base_config`
namgyu-youn 8cd2400
add TODO for future update
namgyu-youn 50dedb8
update integration test for new SmoothQuant API
namgyu-youn bb25adb
add unittest: sanity check for smoothquant acc
namgyu-youn e630948
bugfix: ImportError for `ToyLinearModel`
namgyu-youn 4eca4c2
revert: smoothquant unit test name
namgyu-youn 759f86f
revert: integration test
namgyu-youn 844a8af
update docs
namgyu-youn f756df9
update docs
namgyu-youn bd6bf13
add skiptest: no cuda case
namgyu-youn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,13 @@ | ||
| from .api import ( | ||
| SmoothQuantConfig, | ||
| insert_smooth_quant_observer_, | ||
| load_smooth_quant_recipe, | ||
| save_smooth_quant_recipe, | ||
| from .api import SmoothQuantConfig | ||
| from .core import ( | ||
| SmoothQuantObservedLinear, | ||
| SmoothQuantObserver, | ||
| SmoothQuantStep, | ||
| ) | ||
| from .core import SmoothQuantObservedLinear | ||
|
|
||
| __all__ = [ | ||
| "insert_smooth_quant_observer_", | ||
| "load_smooth_quant_recipe", | ||
| "save_smooth_quant_recipe", | ||
| "SmoothQuantConfig", | ||
| "SmoothQuantStep", | ||
| "SmoothQuantObserver", | ||
| "SmoothQuantObservedLinear", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.