xtuner icon indicating copy to clipboard operation
xtuner copied to clipboard

权重载入

Open zwhus opened this issue 1 year ago • 1 comments

发现一个问题,因为微调为保存得到的是pt, 然后使用pth_to_hf后,保存为safetensor的形式,再多卡测试时载入,发现显存占用超过80g,但是将其保存为bin形式,每张卡显存均保持在30g,这是为什么呢,能否转换为hf的时候直接变成bin呢

zwhus avatar May 14 '24 12:05 zwhus

@zwhus 在 v0.1.19 版本中,我们将默认的保存格式改为了 bin,如果想保存 safetensor,可加添加 --safe-serialization

https://github.com/InternLM/xtuner/pull/648

pppppM avatar May 16 '24 07:05 pppppM