Skip to content

解决PeftModel.from_pretrained加载权重前后dtype不一致的问题 #2007

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

Merged
merged 5 commits into from
Mar 25, 2025

Conversation

xing-yiren
Copy link
Contributor

Fixes #2006

@xing-yiren
Copy link
Contributor Author

修改后检查加载ckpt前后的dtype,发现可以保持一致

  • ckpt文件的dtype
    image

  • 加载权重后的dtype
    image

检查加载权重的数值,可对齐
image

@lvyufeng lvyufeng merged commit 4adcdb8 into mindspore-lab:master Mar 25, 2025
3 of 34 checks passed
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

Successfully merging this pull request may close these issues.

PeftModel.from_pretrained加载权重后的dtype无法和ckpt保持一致
2 participants