ymcui / Chinese-LLaMA-Alpaca-2

中文LLaMA-2 & Alpaca-2大模型二期项目 + 64K超长上下文模型 (Chinese LLaMA-2 & Alpaca-2 LLMs with 64K long context models)
Apache License 2.0
7.06k stars 578 forks source link

DeepSpeed提示Loss scale already at minimum,然后就自动退出。 #486

Closed leonunix closed 8 months ago

leonunix commented 9 months ago

提交前必须检查以下项目

问题类型

模型训练与精调

基础模型

Others

操作系统

Linux

详细描述问题

我在使用数据做训练的时候DeepSpeed提示Loss scale already at minimum然后就自己中断训练了 然后我在下面地址找到一样的问题。最后通过把fp16切换成bf16解决了这个问题。我想问一下。为什么你们训练模型的时候没问题呢?LLama2本身是使用bf16训练的。理论继续训练也应该用bf16才对啊?

https://github.com/microsoft/DeepSpeed/issues/4017

依赖情况(代码类问题务必提供)

# 请在此处粘贴依赖情况(请粘贴在本代码块里)

运行日志或截图

# 请在此处粘贴运行日志(请粘贴在本代码块里)
iMountTai commented 9 months ago

我们也是采用的bf16训练,但是因为较多人手里的显卡不支持bf16,所以脚本中都是以fp16显示的。基于我们的模型做少量数据精调一般不会出现Loss scale问题,从头预训练出现该问题的可能性比较大。

github-actions[bot] commented 8 months ago

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[bot] commented 8 months ago

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.