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

Offline QuaRot Implementation #1556

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Offline QuaRot Implementation #1556

merged 2 commits into from
Jan 22, 2025

Conversation

jambayk
Copy link
Contributor

@jambayk jambayk commented Jan 16, 2025

Describe your changes

  • Previous QuaRot pass is replaced with our own implementation of the pass which only performs the offline weight rotation.
  • The online hadamard rotation parts are not relevant to us since it involves reimplementing the model architecture or updating them dynamically to add the input/kv rotation functions. Moreover, these are not compatible with onnx export.
  • This pass does not do any quantization. The rotated output model should be subsequently quantized using GPTQ and/or QDQ passes.
  • All usage of quarot from the examples and cli are removed. New examples and cli options will be added once E2E validation of Rotate -> GPTQ -> QDQ workflows is complete.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.
  • Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

(Optional) Issue link

@jambayk jambayk marked this pull request as draft January 16, 2025 23:24
@jambayk jambayk force-pushed the jambayk/quarot branch 3 times, most recently from b0da280 to 360e955 Compare January 17, 2025 00:17
@jambayk jambayk requested a review from Copilot January 17, 2025 00:44

Choose a reason for hiding this comment

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

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Base automatically changed from jambayk/adapter to main January 22, 2025 02:04
@jambayk jambayk marked this pull request as ready for review January 22, 2025 02:07
@jambayk jambayk merged commit ab72d69 into main Jan 22, 2025
24 checks passed
@jambayk jambayk deleted the jambayk/quarot branch January 22, 2025 23:30
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.

2 participants