chinese-llama-2-13b-hf可否直接用bf16继续预训练?
NLP-Learning opened this issue · 3 comments
NLP-Learning commented
提交前必须检查以下项目
- 请确保使用的是仓库最新代码(git pull)
- 已阅读项目文档和FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案。
- 第三方插件问题:例如llama.cpp、text-generation-webui等,建议优先去对应的项目中查找解决方案。
问题类型
模型训练与精调
基础模型
Others
操作系统
Linux
详细描述问题
老师您好,我基于chinese-llama-2-13b-hf作为基座模型,继续扩充了词表,并使用fp16继续预训练,但是一段时间后会遇到loss突刺,loss变得特别大且无法再收敛。
我随后换了bf16,目前还在训练中,没有再loss突刺,但我突然想到chinese-llama-2-13b-hf是使用fp16精度训练的,我直接使用bf16基于chinese-llama-2-13b-hf继续预训练合理吗?最后保存的时候是不是也会把原来fp16的权重变成了bf16的权重,会不会造成模型推理的错乱或者精度降低?
恳请老师解惑,感谢!
依赖情况(代码类问题务必提供)
# 请在此处粘贴依赖情况(请粘贴在本代码块里)
运行日志或截图
# 请在此处粘贴运行日志(请粘贴在本代码块里)
github-actions commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.
github-actions commented
Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.
ymcui commented
可以用bf16,相对会稳定一些。