Closed ziyinwang98 closed 2 months ago
建议重新跑一遍训练然后再按照最新的方式加载
建议重新跑一遍训练然后再按照最新的方式加载
您好,感谢回复,我又试了一下用最新更新的finetune和trainer文件训练会直接报错如下:
Traceback (most recent call last):
File "/home/xxx/MiniCPM-V-new/finetune/finetune.py", line 327, in
在替换最新的finetune和trainer文件前可正常训练,且可使用最新readme中的方式读取model和lora_model
你先试试单卡训练 看看有没有报错
Hi!
I'm having the same issue as @ziyinwang98. I used the latest code for fine-tuning the model and storing the checkpoints, but when I want to load the model using the latest method, I get the error:
ModuleNotFoundError: No module named 'transformers_modules'
Can you please help me?
Do you try in this code?
Hi @qyc-98 ! It worked after I updated to the latest code on the repository.
Thank you for your help!
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
我最近也遇到了使用官方提供的lora微调代码效果不好的情况,参考了https://github.com/OpenBMB/MiniCPM-V/issues/333这个issue拉取了最新的代码和模型代码,使用最新的finetune代码完成训练后参考finetune readme中的模型读取方式失败。查了一些相同报错的文章好像都和我的情况不一样。 Traceback (most recent call last): File "/home/xxx/MiniCPM-V-new/evaluation_qa_minicpm.py", line 15, in
model = AutoPeftModel.from_pretrained(
File "/home/xxx/miniforge-pypy3/envs/minicpm/lib/python3.10/site-packages/peft/auto.py", line 97, in from_pretrained
parent_library = importlib.import_module(parent_library_name)
File "/home/xxx/miniforge-pypy3/envs/minicpm/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'transformers_modules'
期望行为 | Expected Behavior
期望可以正常读取模型推理
复现方法 | Steps To Reproduce
运行环境 | Environment
备注 | Anything else?
No response