OpenBMB / MiniCPM-V

MiniCPM-Llama3-V 2.5: A GPT-4V Level Multimodal LLM on Your Phone
Apache License 2.0
7.82k stars 543 forks source link

MiniCPM-Llama3-V 2.5 全参数微调最小的显存需求 #286

Open Millie-Xu opened 2 weeks ago

Millie-Xu commented 2 weeks ago

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

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

当前行为 | Current Behavior

No response

期望行为 | Expected Behavior

针对 MiniCPM-Llama3-V 2.5,我使用两张2张v100或者4张v100,batchsize设置为1,deepspeed zero3配置,并尽可能将所有参数放置在cpu上,仍然显示显存不够,请问该模型全参数微调所需的最小显存需求是什么?

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

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

备注 | Anything else?

No response

yihp commented 1 week ago

@Millie-Xu offload到cpu都不够吗?另外请问您使用的是什么微调脚本呢?

Millie-Xu commented 1 week ago

你好,我已经解决啦,谢谢

todaydeath commented 5 days ago

你好,我已经解决啦,谢谢 请问你是怎么解决的呢?最终占用了多少显存?

Millie-Xu commented 4 days ago

你好,我已经解决啦,谢谢 请问你是怎么解决的呢?最终占用了多少显存?

用了8张V100,显存差不多占满了

LDLINGLINGLING commented 17 hours ago

那你应该是全量微调对吧