Loading Big Model exceed max_memory
See original GitHub issueSystem Info
- `Accelerate` version: 0.11.0.dev0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- Numpy version: 1.21.6
- PyTorch version (GPU?): 1.11.0+cu113 (True)
- `Accelerate` default config:
Not found
Information
- The official example scripts
- My own modified scripts
Tasks
- One of the scripts in the examples/ folder of Accelerate or an officially supported
no_trainer
script in theexamples
folder of thetransformers
repo (such asrun_no_trainer_glue.py
) - My own task or dataset (give details below)
Reproduction
https://colab.research.google.com/drive/1lh9rduNcnGNPHgqWfgTmRK_5k51gF75q?usp=sharing
Expected behavior
When using "max_memory" parameter, the script should only use the specified max memory. However, it exceed the max_memory parameter and consumes the whole memory, then it crashes Colab.
Any idea why it doesn't respect the parameter?
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Handling big models - Hugging Face
Load those weights inside the model. While this works very well for regularly sized models, this workflow has some clear limitations when we...
Read more >Memory management best practices | Memorystore for Redis
If system memory usage ratio exceeds 80% you should lower maxmemory-gb , but first view how the system memory usage ratio has changed...
Read more >Maximum Memory or File Size Exceeded - Microsoft Support
This message appears when the maximum memory or file size limit for a Data Model is exceeded. In the 32-bit version of Office,...
Read more >What does Redis do when it runs out of memory?
Another way to use Redis as a cache is the maxmemory directive, a feature that allows specifying a maximum amount of memory to...
Read more >Min and Max memory configurations in SQL Server Database ...
SQL Server uses buffer cache to load pages from the disk depending on the workload requirements. It is necessary to minimize the disk...
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 FreeTop 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
Top GitHub Comments
I success load big model on Colab Pro with this guide from Huggingface
https://huggingface.co/docs/transformers/big_models https://huggingface.co/docs/accelerate/big_modeling
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.