MiniCPM-V icon indicating copy to clipboard operation
MiniCPM-V copied to clipboard

[BUG] <title>LLama-Factory train issue solved

Open shuaijiang opened this issue 9 months ago • 4 comments

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • [x] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • [x] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

I have solved the issue of llamafactory train by

  1. install transformers==4.44.2
  2. git reset 3dc938268c360ccf1a55cfa16a618ae466f1b4ce --hard (llama-factory repo)
  3. pip install -e ".[torch,metrics,deepspeed,minicpm_v]" (in llama-factory dir)
  4. commit the line 551 of src/llamafactory/data/template.py : '#if template.mm_plugin.class.name != "BasePlugin": # check_version("transformers>=4.45.0")'

期望行为 | Expected Behavior

No response

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?

No response

shuaijiang avatar Mar 17 '25 12:03 shuaijiang

transformer ==4.48.3

yzy-lbn999 avatar Mar 17 '25 13:03 yzy-lbn999

@shuaijiang can you share the python and pytorch version. Tried your steps but I can't seem to make it work on windows 10. Which OS are you using?

ZeeshanZulfiqarAli avatar Mar 17 '25 16:03 ZeeshanZulfiqarAli

@shuaijiang can you share the python and pytorch version. Tried your steps but I can't seem to make it work on windows 10. Which OS are you using?

OS: CentOS Linux release 7.9.2009 Python 3.10.12 torch 2.4.0+cu121 torchaudio 2.4.0+cu121 torchinfo 1.7.2 torchvision 0.19.0+cu121

shuaijiang avatar Mar 18 '25 01:03 shuaijiang

Thank you for sharing the detailed fix😊!

ZMXJJ avatar Aug 11 '25 09:08 ZMXJJ