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

执行finetune.sh时出现问题 #34

Closed
tianbuwei opened this issue Apr 4, 2023 · 1 comment
Closed

执行finetune.sh时出现问题 #34

tianbuwei opened this issue Apr 4, 2023 · 1 comment

Comments

@tianbuwei
Copy link

There were missing keys in the checkpoint model loaded: ['base_model.model.model.embed_tokens.weight', 'base_model.model.model.layers.0.self_attn.q_proj.weight', 'base_model.model.model.layers.0.self_attn.k_proj.weight', 'base_model.model.model.layers.0.self_attn.v_proj.weight', ....]
程序在训练完成后,需要加载模型参数进行预测时会报错,如上:
我看了下您的代码,好像模型只会加载 LoRA的参数,而不加载LLaMa的参数,所以才会出现这样的问题。
请问一下,我这该怎么处理

@Facico
Copy link
Owner

Facico commented Apr 4, 2023

@tianbuwei 如果是missing key的warning的话是没有问题的。因为是分两段加载,peft在只加载lora那一段的时候会出现这个问题,但此时的model已经加载过llama参数了。

你加载模型报错是在运行哪个脚本的时候报错,同时可以参考我们的issue template提供更完整的报错信息。

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

2 participants