AssertionError: Model should be on CPU before parallelization. It is more memory-efficient.
See original GitHub issueHello, first of all congratulations for this amazing project. It’s simple, efficient and versatile. Very useful.
In some cases, it happens that one has several GPUs, but not enough RAM to parallelize the model.
When loading the model on GPU, and then parallelizing, I’m getting the below error:
AssertionError: Model should be on CPU before parallelization. It is more memory-efficient.
It doesn’t stop the script, but it seems that the parallelization fails.
My question is: is it possible to load the initial model on GPU instead of CPU (even if it’s not memory-efficient) or not at all?
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:29 (16 by maintainers)
Top Results From Across the Web
Command-line Tools — fairseq 0.12.2 documentation
Fairseq provides several command-line tools for training and evaluating models: fairseq-preprocess: Data pre-processing: build vocabularies and binarize ...
Read more >Torch not compiled with CUDA enabled" in spite upgrading to ...
python - "AssertionError: Torch not compiled with CUDA enabled" in spite upgrading to CUDA version - Stack Overflow. Stack Overflow for Teams – ......
Read more >DeepSpeed: Extreme-scale model training for everyone
Model parallelism reduces the memory proportional to the number of workers. Model parallelism is the most memory efficient among the three types ...
Read more >vk_mini_path_tracer - GitHub Pages
This tutorial is a beginner-friendly introduction to writing your own fast, photorealistic path tracer in less than 300 lines of C++ code and...
Read more >parlai.utils — ParlAI Documentation
Add special tokens to the tokenizer. These tokens are never split, and prioritized over the BPE tokenization. finalize (frequencies: Dict[str, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks a lot @hyunwoongko . I will try the above and close this issue. I think my request goes beyond the scope of parallelformers. Thanks again!
It works great! Thanks for the quick addition! 🥇
Thanks again for the great work, that’s very useful.