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

covert SVDLinear dtype #1495

Merged
merged 1 commit into from
Feb 21, 2024
Merged

covert SVDLinear dtype #1495

merged 1 commit into from
Feb 21, 2024

Conversation

PHOSPHENES8
Copy link
Contributor

If the data types are not converted appropriately, the following errors may occur:

File "/home/user/miniconda3/lib/python3.11/site-packages/transformers/models/llama/modeling_llama.py", line 691, in forward
    query_states = self.q_proj(hidden_states)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.11/site-packages/peft/tuners/adalora/layer.py", line 175, in forward
    result += (dropout(x) @ (lora_A * lora_E).T @ lora_B.T) * scaling / ranknum
               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
RuntimeError: expected mat1 and mat2 to have the same dtype, but got: c10::Half != float```

@PHOSPHENES8 PHOSPHENES8 marked this pull request as draft February 21, 2024 08:37
@PHOSPHENES8 PHOSPHENES8 marked this pull request as ready for review February 21, 2024 08:38
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

In principle this looks good ! thanks a lot for fixing !
what do you think @pacman100 @BenjaminBossan ?

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes!

@younesbelkada younesbelkada merged commit cc27cfd into huggingface:main Feb 21, 2024
14 checks passed
BenjaminBossan pushed a commit to BenjaminBossan/peft that referenced this pull request Mar 14, 2024
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.

4 participants