InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

加载模型做finetune报错alueError: Target modules ['self_attn.q_proj', 'self_attn.k_proj', 'self_attn.v_proj', 'self_attn.o_proj', 'mlp.gate_proj', 'mlp.down_proj', 'mlp.up_proj'] not found in the base model. Please check the target modules and try again.

Open Qinger27 opened this issue 9 months ago • 6 comments

ValueError: Target modules ['self_attn.q_proj', 'self_attn.k_proj', 'self_attn.v_proj', 'self_attn.o_proj', 'mlp.gate_proj', 'mlp.down_proj', 'mlp.up_proj'] not found in the base model. Please check the target modules and try again. 请问有人遇到过这个问题吗?要怎么解决呢?

Qinger27 avatar May 07 '24 06:05 Qinger27

同问

dandanW91 avatar May 07 '24 07:05 dandanW91

➕1

Colorfu1 avatar May 07 '24 10:05 Colorfu1

报错看起来像lora target module没有找成功,猜测是模块名错了,如果是QKV的话应该是wqkv 如果是V1.5模型,可以尝试用swift来微调https://github.com/OpenGVLab/InternVL/issues/129

hjh0119 avatar May 08 '24 08:05 hjh0119

你用的脚本应该是1.2的微调脚本吧,1.5的要把上面这些改成wqkv

linsiwei123 avatar May 15 '24 07:05 linsiwei123

请问一下什么叫改成wqkv?可以具体说一下怎么改吗,谢谢!

McCarthyjfq avatar May 21 '24 08:05 McCarthyjfq

请问一下什么叫改成wqkv?可以具体说一下怎么改吗,谢谢!

具体来说的话,在这个文件里internvl_chat/internvl/model/internvl_chat/modeling_internvl_chat.py 你需要这么改 1716280956910 1716280971012

linsiwei123 avatar May 21 '24 08:05 linsiwei123

这边需要对不同语言模型用不同的key去匹配,我加个TODO。

czczup avatar May 30 '24 13:05 czczup