有效节省显存的原因
Open
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 448
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 26
Description
哈喽
感谢开发xtuner这么强的工具!
有个显存消耗的问题想咨询一下。
问题:lora微调qwen2-7b时,测试显存占用;主要看model(**input)这一步,即前向的显存占用,发现比理论分析的少了一半;具体来说,理论上一次前向fp16精度下 所有激活应该占用接近30个G左右显存,但是xtuner只占用了一半;看参数并没有开启gradient checkpointing(activation checkpointing),那是怎么做到显存节省的呢?
期待回答,非常感谢!
Contributor guide
Assessment
This issue has not been assessed yet.