Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qwen2.5-7B-Instruct 微调 loss 和 梯度问题 #362

Open
ZY-LUCK opened this issue Feb 17, 2025 · 2 comments
Open

Qwen2.5-7B-Instruct 微调 loss 和 梯度问题 #362

ZY-LUCK opened this issue Feb 17, 2025 · 2 comments

Comments

@ZY-LUCK
Copy link

ZY-LUCK commented Feb 17, 2025

训练过程中,loss 为 0,梯度为 nan

{'loss': 418.7236, 'grad_norm': nan, 'learning_rate': 9.856938483547926e-05, 'epoch': 0.04}
{'loss': 0.0, 'grad_norm': nan, 'learning_rate': 9.713876967095852e-05, 'epoch': 0.09}
...

@KMnO4-zx
Copy link
Contributor

可能是peft或transformers包版本的问题,可以尝试使用教程中提供的镜像再次进行训练~

@ZY-LUCK
Copy link
Author

ZY-LUCK commented Feb 18, 2025

可能是peft或transformers包版本的问题,可以尝试使用教程中提供的镜像再次进行训练~

使用镜像估计没问题, 我自己搭建的环境, 也是用的教程中提供的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants