llm
memory_error
ai_generated
true
OutOfMemoryError: cannot load model weights
ID: llm/model-loading-oom
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
Model weights exceed available RAM/VRAM.
genericWorkarounds
-
90% success Use quantization: load_in_4bit or load_in_8bit
-
88% success Use device_map="auto" for multi-GPU model parallelism
Dead Ends
Common approaches that don't work:
-
Use swap space for model loading
75% fail
Extremely slow inference
-
Load model partially and ignore missing weights
88% fail
Broken model, garbage output