-
Notifications
You must be signed in to change notification settings - Fork 3
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
Composability #219
base: add-24-compressor
Are you sure you want to change the base?
Composability #219
Conversation
src/compressed_tensors/compressors/model_compressors/model_compressor.py
Show resolved
Hide resolved
load_pretrained_quantization(model, model_path) | ||
model_path_or_state_dict = ( | ||
model.state_dict() if sparse_decompressed else model_path | ||
) |
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.
why did we remove load_pretrained_quantization
? what happens when there's only quantization?
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.
theres duplicate
if self.quantization_compressor is not None:
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.
The duplicate condition above is needed to update the structure of the model for now, Will update in a follow up to completely isolate these two compressions.
@dsikka load_pretrained_quantization
this call is in the above if condition, it works for just quantized cases as well.
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.
Remove the unnecessary apply_quantization_config call
# update model structure | ||
names_to_scheme = apply_quantization_config(model, self.quantization_config) | ||
load_pretrained_quantization(model, model_path) | ||
|
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.
Should only be applying the quant compressor once
49cc3d8
to
609a3c3
Compare
No description provided.