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

微调的过程中,在保存模型的时候出错 #2

Open
xinliu9451 opened this issue Jul 19, 2024 · 5 comments
Open

微调的过程中,在保存模型的时候出错 #2

xinliu9451 opened this issue Jul 19, 2024 · 5 comments

Comments

@xinliu9451
Copy link

@shuaijiang 如标题,在保存微调模型时报错:
Some tensors share memory, this will lead to duplicate memory on disk and potential differences when loading them again: {failing}.
A potential way to correctly save your model is to use save_model.
More information at https://huggingface.co/docs/safetensors/torch_shared_tensors

请问这个要怎么解决呢?

@LeonCai1
Copy link

https://www.reddit.com/r/MLQuestions/comments/1ee5a89/finetuning_an_llm_runtimeerror_some_tensors_share/

我看了这个帖子down grade了一些packages,然后如果还报其他错就把报错的升级,就能用了。根据我的实验应该是
torch或者torchdata版本的问题

@xinliu9451
Copy link
Author

https://www.reddit.com/r/MLQuestions/comments/1ee5a89/finetuning_an_llm_runtimeerror_some_tensors_share/

我看了这个帖子down grade了一些packages,然后如果还报其他错就把报错的升级,就能用了。根据我的实验应该是 torch或者torchdata版本的问题

谢谢解答,能不能把你的环境配置发我一下,包的版本太多了,一个一个试错太费时间了

@LeonCai1
Copy link

peft==0.12.0
transformers==4.44.0
torch==2.4.0
torchdata==0.5.1
loralib==0.1.1
peft==0.12.0

@xinliu9451
Copy link
Author

peft==0.12.0 transformers==4.44.0 torch==2.4.0 torchdata==0.5.1 loralib==0.1.1 peft==0.12.0
get,谢谢~

@gody7334
Copy link

set save_safetensors=False in Seq2SeqTrainingArguments can help

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