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

Unable to train fintuned LoRA on forget #10

Open
shaswati1 opened this issue Mar 7, 2024 · 3 comments
Open

Unable to train fintuned LoRA on forget #10

shaswati1 opened this issue Mar 7, 2024 · 3 comments
Assignees

Comments

@shaswati1
Copy link

Getting below error while trying to train the finetuned (LoRA llama2) on forget set:
ValueError: Target module Dropout(p=0.05, inplace=False) is not supported. Currently, only the following modules are supported: torch.nn.Linear, torch.nn.Embedding, torch.nn.Conv2d, transformers.pytorch_utils.Conv1D.

can you please help me with this?

@pratyushmaini pratyushmaini self-assigned this Mar 13, 2024
@gyuilLim
Copy link

gyuilLim commented Dec 17, 2024

Did you solve it?? @shaswati1

@gyuilLim
Copy link

I thought it was a Python version issue, so I upgraded to 3.9, but the same error still occurs.

So I guess that if a Dropout layer is not inside a Conv2D or Linear sequential layer and instead exists independently outside the sequential layer, dropout layer is not converted to lora_dropout

As a temporary workaround, I added the following code at line 225 in peft/tuners/lora/model.py:

else:
    if isinstance(target, nn.Dropout):
        return

Although this is not a fundamental solution, it resolves the issue for now.

@gyuilLim
Copy link

Please refer to this issue.

huggingface/peft#2286

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

No branches or pull requests

3 participants