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

如何检查模型是否加载成功? #53

Closed
Tron1994 opened this issue Jan 12, 2023 · 5 comments
Closed

如何检查模型是否加载成功? #53

Tron1994 opened this issue Jan 12, 2023 · 5 comments

Comments

@Tron1994
Copy link

cpm2-finetune 出现过模型并未成功加载的情况,定位为deepspeed问题?
TsinghuaAI/CPM-2-Finetune#11

想问下,cpm1-finetune会有类似问题吗,以及加载后初始loss应该是多少左右

cpm2说是小于5

@t1101675
Copy link
Contributor

如果使用我们提供的 docker 就不会有这个问题。直接自己配环境的话可以参考这个 issue 解决

@Tron1994
Copy link
Author

如果使用我们提供的 docker 就不会有这个问题。直接自己配环境的话可以参考这个 issue 解决

我用的最新的deepspeed,代码结构不一样的,不太清楚怎么定位到https://github.com/TsinghuaAI/CPM-2-Finetune/issues/11中的问题了;所以想知道怎么验证是否真的加载成功了,比如初始的loss 应该在什么水平,说CPM2初始小于5,那CPM1呢;我加载成功CPM1后,初始在10的样子,我担心会出现那个issue的问题

@t1101675
Copy link
Contributor

t1101675 commented Jan 13, 2023

在 Chid 数据集上,一开始 loss 确实较大,9-10正常,但是经过几步优化过后会很快降低到2-3左右。使用 fp32 的脚本微调其实就不会遇到那个 issue 的问题。那个问题只存在于 fp16 微调

@Tron1994
Copy link
Author

在 Chid 数据集上,一开始 loss 确实较大,9-10正常,但是经过几步优化过后会很快降低到2-3左右

那应该没问题,相同的环境CPM2是被验证加载成功的;我用的 deepspeed 0.7.7,并没有做对应修改,可能已经修复了

@447428054
Copy link

@Tron1994 你好,请问你基于CPM微调时是怎么加载模型的呢

我看其加载代码中都是有latest_checkpointed_iteration这个文件的

image

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

3 participants