You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
________________________________
发件人: hepj987 ***@***.***>
发送时间: Monday, April 17, 2023 8:10:33 PM
收件人: ydli-ai/Chinese-ChatLLaMA ***@***.***>
抄送: Subscribed ***@***.***>
主题: [ydli-ai/Chinese-ChatLLaMA] 使用zero3以后的模型加载问题 (Issue #30)
* 结合此项目的示例方法成功进行预训练、增量训练,推理(generate_chatllama.py放不下,使用的generate_lm_deepspeed.py)环境应该是没有问题的。
* 由于保存的模型都是zero_pp_rank_XX_mp_rank_XX_optim_states.pt和zero_pp_rank_XX_mp_rank_XX_model_states.pt这种格式的,无法利用训练后的模型进行 推理 、增量训练。利用保存模型路径下的脚本zero_to_fp32.py进行转换python zero_to_fp32.py . pytorch_model.bin
* 这里使用的是7B的模型,cpu内存从16G增长到90多G,之后进程就死掉了。目前看着像是cpu内存不够导致的,模型保存文件-best是70多G,请问有什么方法能够转换成bin格式的模型么?
* 同时疑惑,现在可能是自己cpu内存不够导致的进程kill,如果之后用13B 30B 65B的模型(7B保存的模型75G,并且128G的cpu内存都不够用),难道要一直增加cpu内存来解决这个问题嘛。有没有大佬可以可以帮忙解决这个问题,感谢!
―
Reply to this email directly, view it on GitHub<#30>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE3SPVYV2DSPVW27BLTBKU3XBUXLTANCNFSM6AAAAAAXBC6KAU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
结合此项目的示例方法成功进行预训练、增量训练,推理(generate_chatllama.py放不下,使用的generate_lm_deepspeed.py)环境应该是没有问题的。
由于保存的模型都是zero_pp_rank_XX_mp_rank_XX_optim_states.pt和zero_pp_rank_XX_mp_rank_XX_model_states.pt这种格式的,无法利用训练后的模型进行 推理 、增量训练。利用保存模型路径下的脚本zero_to_fp32.py进行转换python zero_to_fp32.py . pytorch_model.bin
这里使用的是7B的模型,cpu内存从16G增长到90多G,之后进程就死掉了。目前看着像是cpu内存不够导致的,模型保存文件-best是70多G,请问有什么方法能够转换成bin格式的模型么?
同时疑惑,现在可能是自己cpu内存不够导致的进程kill,如果之后用13B 30B 65B的模型(7B保存的模型75G,并且128G的cpu内存都不够用),难道要一直增加cpu内存来解决这个问题嘛。有没有大佬可以可以帮忙解决这个问题,感谢!
The text was updated successfully, but these errors were encountered: