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 merge reward adapter into model #14

Open
XuanRen4470 opened this issue Jul 18, 2023 · 0 comments
Open

unable to merge reward adapter into model #14

XuanRen4470 opened this issue Jul 18, 2023 · 0 comments

Comments

@XuanRen4470
Copy link

XuanRen4470 commented Jul 18, 2023

while I am doing the second last step
Merge Reward adapter into Model: python merge_peft_adapter.py --model_name ./reward_model_vicuna-7b

I got the following error

Traceback (most recent call last):
  File "/home/xuan/anaconda3/envs/vicuna_lora/lib/python3.9/site-packages/peft/tuners/lora.py", line 382, in __getattr__
    return super().__getattr__(name)  # defer to nn.Module's logic
  File "/home/xuan/anaconda3/envs/vicuna_lora/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1614, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'LoraModel' object has no attribute '_get_submodules'

how to solve this problem?

never mind, the problem is solved by PEFT的版本,目前从git上安装的是 0.3.0.dev0 版本,在merge_peft_adapter的时候有问题,需要切换到peft==0.2.0 (0.3.0.dev0 没有 _get_submodules()这个函数) as mentioend in the github page.

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

1 participant