-
Notifications
You must be signed in to change notification settings - Fork 11
[Performance] Reduce compression memory requirements via structure change #301
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
base: main
Are you sure you want to change the base?
Changes from all commits
c1b06de
48fbbd8
90cf72d
783a081
735660d
6017f05
9524c7f
ac27709
72dd867
2fc0403
37da099
e3359eb
b5374ae
dfef94d
700d4b6
8ae9004
ab70311
ca600ca
97bda13
6060bbe
d4e96d1
b1d384f
436929a
43736a9
9e82ddb
f324af7
d4affd4
f2898df
0272c1c
1862e0f
3ac19fa
16f9f1f
25e1ec3
ef4dd02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
"dequantize", | ||
"fake_quantize", | ||
"wrap_module_forward_quantized", | ||
"unwrap_module_forward_quantized", | ||
"forward_quantize", | ||
] | ||
|
||
|
@@ -312,6 +313,10 @@ def wrapped_forward(self, *args, **kwargs): | |
setattr(module, "forward", bound_wrapped_forward) | ||
|
||
|
||
def unwrap_module_forward_quantized(module: Module): | ||
delattr(module, "forward") # revert to class implementation | ||
Comment on lines
+316
to
+317
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this then expose the forward method on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this exposes the forward method of the class implementation |
||
|
||
|
||
def forward_quantize( | ||
module: Module, value: torch.Tensor, base_name: str, args: "QuantizationArgs" | ||
) -> torch.Tensor: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we run compression here too, for cases when we only have sparsity!