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

Mixed Precision Merging #316

Open
sais-github opened this issue May 10, 2024 · 1 comment
Open

Mixed Precision Merging #316

sais-github opened this issue May 10, 2024 · 1 comment

Comments

@sais-github
Copy link

I am curious about whether models used for merging are converted to the set dtype before merging, or if it is only the resulting merge being converted.
And if there is any loss when merging a fp16 and bf16 model?

@cg123
Copy link
Collaborator

cg123 commented May 26, 2024

When you specify a dtype everything is converted to the specified dtype before merging, yeah.

Merging between fp16 and bf16 is potentially lossy, as both data types are capable of representing values that the other is not. This generally isn't going to be a meaningful difference though. If you're working with something super numerically sensitive, I'd recommend upcasting to fp32. I haven't found a use case that needs that kind of precision yet personally.

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