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

[fix]Update merge model related codes : avoid UnboundLocalError #1283

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AndyVerne
Copy link

In Transformers = 4.43.1 and PEFT=0.12.0, merging llm_reranker_model in the original code will trigger an error: UnboundLocalError: local variable 'active_adapters' referenced before assignment.
By setting model._hf_peft_config_loaded to False, can prevent this issue from occurring.


在transformers = 4.43.1, peft = 0.12.0版本中,原代码merge llm_reranker_model时会报错:UnboundLocalError: local variable 'active_adapters' referenced before assignment。
需要将model._hf_peft_config_loaded设为False,可以避免这个问题出现。

在transformers  = 4.43.1, peft  = 0.12.0版本中,原代码merge llm_reranker_model时会报错:UnboundLocalError: local variable 'active_adapters' referenced before assignment。

需要将model._hf_peft_config_loaded设为False,可以避免这个问题出现
在transformers  = 4.43.1, peft  = 0.12.0版本中,原代码merge llm_reranker_model时会报错:UnboundLocalError: local variable 'active_adapters' referenced before assignment。

需要将model._hf_peft_config_loaded设为False,可以避免这个问题出现
在transformers  = 4.43.1, peft  = 0.12.0版本中,原代码merge llm_reranker_model时会报错:UnboundLocalError: local variable 'active_adapters' referenced before assignment。

需要将model._hf_peft_config_loaded设为False,可以避免这个问题出现
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.

1 participant