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

can you please add the option to runn it on a cpu? #13

Open
Manni1000 opened this issue Jul 10, 2024 · 4 comments
Open

can you please add the option to runn it on a cpu? #13

Manni1000 opened this issue Jul 10, 2024 · 4 comments
Labels
device Something about device

Comments

@Manni1000
Copy link

can you add the option to runn it on a cpu?

@Manni1000
Copy link
Author

Manni1000 commented Jul 10, 2024

or maybe a lower precision (Quantization) one so people can run it with a lower amount of VRAM like 24 GB maybe?

@EthanC111
Copy link
Collaborator

Thanks a lot for your interest! We will add this to our TODO list!

@trygvebw
Copy link

trygvebw commented Jul 10, 2024

For whatever reason, changing the map_location (an argument to torch.load) inside of _convert(...) in loader.py from cuda to cpu made it work on my 24 GB GPU... and the weights seemed to have ended up on GPU anyway?

That is, the following prints cuda:0 for every parameter even with map_location set to cpu:

for _, param in model.named_parameters():
    print(param.device)

I assume there's an implicit .to('cuda') call somewhere in the code, but this still raises the question that if loading the weights to CPU then moving them to GPU works, why do I run out of memory if I try to load them directly to GPU (i.e. with map_location set to cuda)? Does the torch.load call load additional weights that are not actually used?

@JoyBoy-Su JoyBoy-Su added the device Something about device label Jul 11, 2024
@Manni1000
Copy link
Author

i tried that but for me it did not work. and yes in other files stuff gets loaded to the gpu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device Something about device
Projects
None yet
Development

No branches or pull requests

4 participants