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

[Bug] lmdeploy加载lora微调模型报错 #2762

Open
3 tasks done
ltt-gddxz opened this issue Nov 17, 2024 · 4 comments
Open
3 tasks done

[Bug] lmdeploy加载lora微调模型报错 #2762

ltt-gddxz opened this issue Nov 17, 2024 · 4 comments
Assignees

Comments

@ltt-gddxz
Copy link

ltt-gddxz commented Nov 17, 2024

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

基于LORA微调的模型加载预测,报如下错误:
'LoRALinear' object has no attribute 'target_name'

而对于全参微调的模型,可以正常加载预测。

Reproduction

InternVL2-1B基于LORA微调的模型

Environment

torch==2.3.1
transformers==4.43.4
lmdeploy==0.5.3(或0.6.3)

Error traceback

No response

@lvhan028
Copy link
Collaborator

可以提供下具体的复现路径么?

@ltt-gddxz
Copy link
Author

可以提供下具体的复现路径么?

@lvhan028 就是对internvl2-1b的使用lora finetune,最后训练出来的模型没法用lmdeploy来推理,不知道是不是不支持lora finetune的模型推理?如果支持的话我再排查排查自己的问题

@lvhan028
Copy link
Collaborator

是支持的。https://lmdeploy.readthedocs.io/en/latest/llm/api_server_lora.html
要不,先把 lora 合入到主模型中,测试看看?

@lvhan028
Copy link
Collaborator

可以提供下具体的复现路径么?

@lvhan028 就是对internvl2-1b的使用lora finetune,最后训练出来的模型没法用lmdeploy来推理,不知道是不是不支持lora finetune的模型推理?如果支持的话我再排查排查自己的问题

是直接用 internvl 进行 lora finetune 的吗?方便分享下模型权重么?

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