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

Cannot run stackllama example #287

Closed
fecet opened this issue Apr 9, 2023 · 2 comments
Closed

Cannot run stackllama example #287

fecet opened this issue Apr 9, 2023 · 2 comments

Comments

@fecet
Copy link

fecet commented Apr 9, 2023

There is no more _get_submoudles in peft per huggingface/peft#279, so https://github.com/lvwerra/trl/blob/main/examples/stack_llama/scripts/merge_peft_adapter.py cannot use directly.

Also are we expected to use this script to merge both reward model and sft model? At first glance, we should change forcausallm to forsequenceclassfication for reward model, correct?

@vvasily
Copy link

vvasily commented Apr 26, 2023

Use this:

parent, target, target_name = _get_submodules(model.base_model.model, key)

@vpegasus
Copy link

Use this:

parent, target, target_name = _get_submodules(model.base_model.model, key)
make it complete:
at the beginning of the script, add:

from peft.utils import _get_submodules

then
change the line (line 56):

parent, target, target_name = model.base_model._get_submodules(key)

to

parent, target, target_name = _get_submodules(model.base_model.model, key)

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

4 participants