InternVL
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.
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. 请问有人遇到过这个问题吗?要怎么解决呢?
同问
➕1
报错看起来像lora target module没有找成功,猜测是模块名错了,如果是QKV的话应该是wqkv
如果是V1.5模型,可以尝试用swift来微调https://github.com/OpenGVLab/InternVL/issues/129
你用的脚本应该是1.2的微调脚本吧,1.5的要把上面这些改成wqkv
请问一下什么叫改成wqkv?可以具体说一下怎么改吗,谢谢!
请问一下什么叫改成wqkv?可以具体说一下怎么改吗,谢谢!
具体来说的话,在这个文件里internvl_chat/internvl/model/internvl_chat/modeling_internvl_chat.py
你需要这么改
这边需要对不同语言模型用不同的key去匹配,我加个TODO。