🌱⚡
GPU Garden Grow Your Own Compute
Troubleshooting Knowledge Base

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.

⚡ Crawlable GPU Compatibility Hubs & Instant Cloud Rescue

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.

Terminal Stderr & Flag Triage

CLI Runtime Error Reference (llama.cpp & Ollama)

Direct flag-level fixes for CUDA buffer & MoE allocation errors
CUDA Error Code 2

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.

Open CLI Triage →
50%–75% KV Savings

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.

Open Flag Guide →
120B–235B MoE Hybrid

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.

Open MoE Guide →
PyTorch Allocator

RuntimeError: CUDA out of memory

Eliminate PyTorch caching allocator fragmentation and reserved-unallocated OOM spikes with expandable_segments:True.

Open PyTorch Fix →
KV Buffer Init

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.

Open KV Init Fix →
PagedAttention

vLLM max_model_len > KV Cache

Pass startup KV block profiling by clamping --max-model-len and enabling --kv-cache-dtype fp8.

Open vLLM Guide →
SM_80+ vs Turing

FlashAttention-2 GPU Arch Error

Resolve FlashAttention only supports Ampere GPUs or newer using SDPA / xFormers fallbacks or native llama.cpp -fa.

Open Arch Fix →
LM Studio Guardrail

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.

Open Slider Fix →
FLUX / Wan 2.1 DiT

ComfyUI Allocation on Device 0 OOM

Stop VAE decode & T5-XXL OOM crashes using FP8 weight streaming, --lowvram, and VAEDecodeTiled.

Open ComfyUI Fix →
macOS Unified Memory

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.

Open Metal Guide →
CUDA Error 700

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.

Open Error 700 Fix →
CUDA Graph Capture

vLLM --gpu-memory-utilization OOM

Balance --gpu-memory-utilization, --enforce-eager, and --max-num-seqs to pass vLLM warmup without OOM.

Open Utilization Fix →
AMD Radeon & Strix Halo

ROCm hipErrorOutOfMemory Fix

Configure HSA_OVERRIDE_GFX_VERSION, GTT aperture limits, and TunableOp buffers on RX 7900 XTX & Ryzen AI Max+ 395.

Open ROCm Guide →
Multi-GPU NCCL

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.

Open NCCL Triage →
QLoRA 4-Bit NF4

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".

Open NF4 Guide →
CALCULATOR

128k Context VRAM Calculator & LLM Concurrency Planner

Why 70B Models OOM on Long Context & How to Plan Multi-Stream Headroom

Read Sizing Guide & Fix →
TROUBLESHOOTING

CUDA Out of Memory on Long Prompts? The KV Cache Growth Fix

Preventing Mid-Generation OOM Crashes on Document Analysis

Read Sizing Guide & Fix →
ENGINE

vLLM 'max_model_len Larger Than KV Cache' Startup Error Fix

Resolving GPU Block Allocation Failures & Tuning Utilization

Read Sizing Guide & Fix →
MODEL

Qwen 2.5 72B 128k Context VRAM Sizing & YaRN Setup

Why Native 32k Limits Require YaRN Scaling for 128k Windows

Read Sizing Guide & Fix →
MODEL

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)

Read Sizing Guide & Fix →
OPTIMIZATION

FP8 vs Q4 KV-Cache Quality & Perplexity Benchmark

Does Quantizing Context Memory Degrade LLM Reasoning?

Read Sizing Guide & Fix →
CONCURRENCY

How Many Concurrent Users Can One GPU Handle for LLMs?

Multi-Stream VRAM Sizing & Concurrency Math for vLLM & SGLang

Read Sizing Guide & Fix →
HARDWARE

Can NVIDIA RTX 5090 (32GB) Run 70B Models? Context Realities

Why 32GB VRAM Demands Extreme Quantization or Dual-Card Setups

Read Sizing Guide & Fix →
HARDWARE

Dual RTX 3090 (48GB) 128k Context Limits & Setup Guide

How to Maximize Context on the r/LocalLLaMA Sovereign Workstation

Read Sizing Guide & Fix →
REALITY-CHECK

Can You Run LLaMA 70B on 24GB VRAM with Long Context?

The Mathematical Truth & Why Cloud Rescue is Mandatory

Read Sizing Guide & Fix →
CLOUD

RunPod vs Vast.ai for 80GB LLM & 128k Context Rentals

Comparing Datacenter Reliability vs Community Cost for 70B & DeepSeek

Read Sizing Guide & Fix →