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

Fix SmoothQuant offload bug #978

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Fix SmoothQuant offload bug #978

wants to merge 2 commits into from

Conversation

dsikka
Copy link
Collaborator

@dsikka dsikka commented Dec 15, 2024

SUMMARY:

  • Offload/onload properly during SmoothQuant calibration

We may actually not need this change?
The issue is because of the following line:

scales = activation_scales.pow(self.smoothing_strength) / weight_scales.pow(
            1 - self.smoothing_strength
        )

i.e y/x

However, we use y.div_(x) when actually applying the smoothing scales, which does it in place and does not cause an issue.

Not 100% sure why one is ok and one is not

Signed-off-by: Dipika <[email protected]>
Copy link

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

@dsikka dsikka marked this pull request as draft December 15, 2024 18:24
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.

1 participant