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

Return empty sparsity config if targets and ignores are empty #1115

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

rahul-tuli
Copy link
Collaborator

@rahul-tuli rahul-tuli commented Jan 29, 2025

This PR fixes an issue where a sparsity configuration could end up being empty under certain conditions. Specifically, if the global sparsity is greater than 0.05, but no individual layer has a sparsity greater than 0.5, we end up with an empty sparsity config.

To address this, we now ensure that an empty sparsity config is not added in such cases


Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@horheynm
Copy link
Collaborator

Would making a test for this .from_pretrained func take a while?

@dsikka dsikka added the ready When a PR is ready for review label Jan 29, 2025
@dsikka dsikka merged commit 8de50a2 into main Jan 29, 2025
7 checks passed
@dsikka dsikka deleted the no-sparsity-config-if-targets-empty branch January 29, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants