Skip to content
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

Open
wants to merge 5 commits into
base: add-24-compressor
Choose a base branch
from
Open

Composability #219

wants to merge 5 commits into from

Conversation

rahul-tuli
Copy link
Member

No description provided.

@rahul-tuli rahul-tuli changed the base branch from main to add-24-compressor December 2, 2024 22:21
load_pretrained_quantization(model, model_path)
model_path_or_state_dict = (
model.state_dict() if sparse_decompressed else model_path
)
Copy link
Contributor

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?

Copy link
Member

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:

Copy link
Member Author

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.

Copy link
Member Author

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)

Copy link
Contributor

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

@horheynm horheynm marked this pull request as ready for review December 3, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants