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

Refactor press-scorer #24

Merged
merged 52 commits into from
Dec 10, 2024
Merged

Refactor press-scorer #24

merged 52 commits into from
Dec 10, 2024

Conversation

maxjeblick
Copy link
Collaborator

This PR refactors the current press class as described in detail in #21.

  • Most presses are now composed of a scorer-pruner combination, e.g. DefaultPruner(compression_ratio=compression_ratio, scorer=KnormScorer()).
  • Presses are flexible and don't need to have compression_ratio, see e.g. PerLayerCompressionPruner.
  • Another example of flexibility is ThinKPress that implements channel compression.

Note: As the Pr is already quite large, I didn't add more refactoring, as suggested in the comment of #21. These helpful changes can be added in a subsequent PR.

Closes #21

@maxjeblick maxjeblick requested a review from SimJeg December 4, 2024 09:54
evaluation/evaluate.py Outdated Show resolved Hide resolved
@maxjeblick maxjeblick merged commit 9ecd556 into main Dec 10, 2024
2 checks passed
@maxjeblick maxjeblick deleted the max/refactor_press branch December 10, 2024 13:49
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.

Refactor press implementation
2 participants