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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoRA: dequantize model #811

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

Conversation

Andrei-Aksionov
Copy link
Collaborator

Hi there 馃憢

This PR adds functionality to dequantize the model that was initially quantized, in case anyone wants to use these weights elsewhere.

The logic is to dequantize to float16 dtype, that is hardcoded in quant_state and then cast to the compute dtype, the one that was used for trainable LoRA parameters and data inputs.
This is exactly how it's done in BNB.

Note: the PR is not yet finalized as, for completeness, I also want to add dequantization for bnb.int8.

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.

None yet

1 participant