LLM VRAM & CUDA OOM Sizing Hub
Grounded in GQA, MLA, and continuous batching mathematics. Understand exactly why your GPU overflows and how to right-size local vs cloud compute.
Want to see every LLM your exact GPU can run right now?
Select your GPU below to open its full VRAM & KV-cache compatibility matrix, or spin up an instant 80GB Cloud GPU pod.
CLI Runtime Error Reference (llama.cpp & Ollama)
ggml_backend_cuda_buffer_type_alloc_ctx
Fix failed to allocate buffer crashes during weight or scratchpad reservation using -ngl, -ctk q8_0, and DWM VRAM recovery.
OLLAMA_KV_CACHE_TYPE Guide
Compress default uncompressed FP16 conversation buffers down to q8_0 or q4_0 to prevent CPU layer spill on long prompts.
llama.cpp --n-cpu-moe Flag
Pin shared attention & KV-cache tensors in fast GPU VRAM while offloading sparse MoE routed experts to DDR5 system RAM.
RuntimeError: CUDA out of memory
Eliminate PyTorch caching allocator fragmentation and reserved-unallocated OOM spikes with expandable_segments:True.
llama_kv_cache_init: failed to allocate
Right-size -c context slots and enable -fa on -ctk q8_0 -ctv q8_0 when KV pre-allocation overflows post-weight VRAM.
vLLM max_model_len > KV Cache
Pass startup KV block profiling by clamping --max-model-len and enabling --kv-cache-dtype fp8.
FlashAttention-2 GPU Arch Error
Resolve FlashAttention only supports Ampere GPUs or newer using SDPA / xFormers fallbacks or native llama.cpp -fa.
LM Studio GPU Offload Greyed Out
Re-enable the GPU layer slider by selecting the CUDA 12 / Vulkan llama.cpp runtime pack and toggling off Strict VRAM Guardrails.
ComfyUI Allocation on Device 0 OOM
Stop VAE decode & T5-XXL OOM crashes using FP8 weight streaming, --lowvram, and VAEDecodeTiled.
MLX Metal Out of Memory on Mac
Raise Apple Silicon's ~75% Metal wired memory cap using sysctl iogpu.wired_limit_mb for large MLX models.
CUDA Illegal Memory Access
Fix page-table faults in Ollama and llama.cpp caused by Windows Sysmem Fallback, PCIe risers, or multi-GPU P2P instability.
vLLM --gpu-memory-utilization OOM
Balance --gpu-memory-utilization, --enforce-eager, and --max-num-seqs to pass vLLM warmup without OOM.
ROCm hipErrorOutOfMemory Fix
Configure HSA_OVERRIDE_GFX_VERSION, GTT aperture limits, and TunableOp buffers on RX 7900 XTX & Ryzen AI Max+ 395.
vLLM --tensor-parallel-size NCCL Fix
Resolve multi-GPU ncclUnhandledCudaError and IOMMU P2P deadlocks on Dual RTX 3090/4090/5090 rigs with NCCL_P2P_DISABLE=1.
bitsandbytes CUDA Setup & NF4 Fix
Fix CUDA Setup failed despite GPU being available and load_in_4bit dispatch OOM using bnb_4bit_quant_type="nf4".
128k Context VRAM Calculator & LLM Concurrency Planner
Why 70B Models OOM on Long Context & How to Plan Multi-Stream Headroom
CUDA Out of Memory on Long Prompts? The KV Cache Growth Fix
Preventing Mid-Generation OOM Crashes on Document Analysis
vLLM 'max_model_len Larger Than KV Cache' Startup Error Fix
Resolving GPU Block Allocation Failures & Tuning Utilization
Ollama Slow Generation (1-2 tok/s)? CPU Offload Troubleshooting & Fix
How to Keep 100% of LLM Layers in Fast GPU VRAM
Qwen 2.5 72B 128k Context VRAM Sizing & YaRN Setup
Why Native 32k Limits Require YaRN Scaling for 128k Windows
DeepSeek V3 Multi-Head Latent Attention (MLA) VRAM Guide
How MLA Shrinks 128k KV Cache to 8.6 GB (And Why Weights Still Need Cloud)
FP8 vs Q4 KV-Cache Quality & Perplexity Benchmark
Does Quantizing Context Memory Degrade LLM Reasoning?
How Many Concurrent Users Can One GPU Handle for LLMs?
Multi-Stream VRAM Sizing & Concurrency Math for vLLM & SGLang
Can NVIDIA RTX 5090 (32GB) Run 70B Models? Context Realities
Why 32GB VRAM Demands Extreme Quantization or Dual-Card Setups
Dual RTX 3090 (48GB) 128k Context Limits & Setup Guide
How to Maximize Context on the r/LocalLLaMA Sovereign Workstation
Can You Run LLaMA 70B on 24GB VRAM with Long Context?
The Mathematical Truth & Why Cloud Rescue is Mandatory
RunPod vs Vast.ai for 80GB LLM & 128k Context Rentals
Comparing Datacenter Reliability vs Community Cost for 70B & DeepSeek