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

Float 16 on GPU? #271

Open
cjerzak opened this issue Jun 9, 2024 · 2 comments
Open

Float 16 on GPU? #271

cjerzak opened this issue Jun 9, 2024 · 2 comments

Comments

@cjerzak
Copy link

cjerzak commented Jun 9, 2024

Hey Clay! Great work on v1.

I've been running some experiments with the model.

Do you know if anyone on your end has been able to get float16 precision working on CPU or GPU?

I tried both on using model.half() and feeding in float16 tensors. But an error indicating that somewhere an incompatible float32 array is being used somewhere in the model (I think it might be traced to the metadata part?). In any case, setting torch.set_default_dtype(torch.float16) didn't seem to do the trick. I will keep trying.

@yellowcap
Copy link
Member

Hi @cjerzak thanks for the compliment! 😊

I am not sure if it is possible to use float16 with Clay. That is probably a question @srmsoumya can answer best. But could you explain why float32 is not an option for you? Is it to optimize GPU usage?

@cjerzak
Copy link
Author

cjerzak commented Jun 11, 2024

Thank you! Mostly we were just curious to see if we could further optimize the model in terms of runtime (by running the model with larger batches of images and so forth).

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