Skip to content

AWQ sanitize_kwargs minor cleanup #1405

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

brian-dellabetta
Copy link
Collaborator

@brian-dellabetta brian-dellabetta commented Apr 30, 2025

SUMMARY:
Using inspect.bind_partial inside the AWQ _sanitize_kwargs helper does provide the robust support we were hoping. We still need to explicitly add None for the edge case, and bind_partial will fail if the input kwargs have fields that are not in the module.forward signature.

So we have to stick with what we have. This PR just has some minor touch-ups and typehints, and removes the helpers that were only used by AWQ and not needed

Resolves #1385
Replaces #1386

TEST PLAN:
No net new src code, just minor cleanup and redundant code removal

@brian-dellabetta brian-dellabetta added the ready When a PR is ready for review label Apr 30, 2025
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.

Signed-off-by: Brian Dellabetta <[email protected]>
@brian-dellabetta brian-dellabetta enabled auto-merge (rebase) May 5, 2025 16:50
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.

AWQ -- Clean up forward passes with kwargs using inspect.bind
4 participants