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

checkpoint模型无法加载 #98

Open
gctian opened this issue Sep 9, 2023 · 3 comments
Open

checkpoint模型无法加载 #98

gctian opened this issue Sep 9, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@gctian
Copy link

gctian commented Sep 9, 2023

🐛 bug 说明

保存的checkpoint目录下缺少文件吧?为啥只有3个文件,而完整的 model目录有6个文件
image
这是完整的模型目录:
image

Python Version

None

@gctian gctian added the bug Something isn't working label Sep 9, 2023
@wangyuxinwhy
Copy link
Owner

checkpoint 保存的是权重,是为了恢复训练流程设计的,而完整的模型还包括 tokenizer 和模型配置等文件,是为了加载和推断设计的。简单来讲就是两者存在的意义不同,是两个东西,所以文件内容不同。

@xiaolvtongxue-zt
Copy link

checkpoint 保存的是权重,是为了恢复训练流程设计的,而完整的模型还包括 tokenizer 和模型配置等文件,是为了加载和推断设计的。简单来讲就是两者存在的意义不同,是两个东西,所以文件内容不同。

你好,这种情况下,我想这两个东西同时保存,是否有参数可以传递?
如果我训练中之保存了.bin 那三个文件,是否时直接把.bin文件放在微调的模型文件中,替换掉原来旧的.bin即可、?

@wangyuxinwhy
Copy link
Owner

wangyuxinwhy commented Apr 15, 2024

Q: 我想这两个东西同时保存,是否有参数可以传递?
A: 目前没有参数可以控制这一行为,

Q: 是否时直接把.bin文件放在微调的模型文件中,替换掉原来旧的.bin即可
A: 只需要替换 pytorch_model.bin 即可,其余两个文件是 "运行时" 才需要的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants