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

运行 generate.py 提示找不到 config.json #13

Closed
ToSev7en opened this issue Mar 30, 2023 · 5 comments
Closed

运行 generate.py 提示找不到 config.json #13

ToSev7en opened this issue Mar 30, 2023 · 5 comments

Comments

@ToSev7en
Copy link

ValueError: Can't find config.json at 'Chinese-VicunaChinese-Vicuna-lora-7b-belle-and-guanaco'

@Facico
Copy link
Owner

Facico commented Mar 30, 2023

@ToSev7en 感谢你的issue。已经将对应的'adapter_config.json'和'adapter_model.bin'上传。

@ToSev7en
Copy link
Author

@ToSev7en 感谢你的issue。已经将对应的'adapter_config.json'和'adapter_model.bin'上传。

好迅速!顺便问下如何转换为 'adapter_config.json'和'adapter_model.bin' ?

@Facico
Copy link
Owner

Facico commented Mar 30, 2023

@ToSev7en
把pytorch_model.bin名字改成adapter_model.bin就可以了,adapter_config.json如果用我们的配置的话仓库的config-sample里面有,如果要改成其他配置的话对应的地方改一下就可以了。
pytorch_model.bin是transformers的trainer生成的中间checkpoint,在generate的时候需要把他的名字改成adapter_model.bin才能被peft加载成lora模型,我们在generate的脚本中对本地的checkpoint文件有设置(会自动复制config并更改名字,这个在readme中有详细的说明),不过远程的lora配置还没进行处理(一般远程是直接上传adapter文件,不过昨天传的时候忘了)

@ToSev7en
Copy link
Author

@ToSev7en 把pytorch_model.bin名字改成adapter_model.bin就可以了,adapter_config.json如果用我们的配置的话仓库的config-sample里面有,如果要改成其他配置的话对应的地方改一下就可以了。 pytorch_model.bin是transformers的trainer生成的中间checkpoint,在generate的时候需要把他的名字改成adapter_model.bin才能被peft加载成lora模型,我们在generate的脚本中对本地的checkpoint文件有设置(会自动复制config并更改名字,这个在readme中有详细的说明),不过远程的lora配置还没进行处理(一般远程是直接上传adapter文件,不过昨天传的时候忘了)

好的,学习了~

@Facico
Copy link
Owner

Facico commented Mar 30, 2023

你也可以使用我huggingface下面的模型,对应的3epoch和你上面加载的模型是一样的,https://huggingface.co/Facico。后续我们将传到对应的organization中

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