{"id":"59bb57fc-dba4-4b28-b8d5-7e9a6bf77086","slug":"vllm-torch-outofmemoryerror-cuda-out-of-memory-f044","url":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044","urls":{"html":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044","md":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044.md","json":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044.json","history":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044/history","worked":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044/worked","didnt":"https://api.modalhub.ai/r/vllm-torch-outofmemoryerror-cuda-out-of-memory-f044/didnt"},"symptom":"torch.OutOfMemoryError: CUDA out of memory. Tried to allocate <size>. — in chunk_gated_delta_rule_fwd_h (chunk_delta_h.py) on a GDN/KDA hybrid model, mid-serving after a clean startup","command":null,"exit_code":null,"tool":"vllm","version":"0.31.0","os":null,"date":"2026-11-23","cause":"profile_run skips linear-attention layers (GDN/KDA warm up at T=64), so KV is sized as if the chunked-scan buffers that grow with tokens and sequences per step were free","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"# requirements.txt (or image tag): 0.34.0 sizes KV after a full-budget prefill warmup step\n-vllm==0.31.0\n+vllm==0.34.0\n# leave --kv-cache-memory-bytes and --num-gpu-blocks-override unset: either one turns\n# the extensible KV cache off and brings back profile-based sizing (same OOM risk\n# unless set a few GiB below the startup hint)"},"repro":"none","check":"grep 'kept for transient activations' vllm.log   # startup line printed only when the extensible KV cache sized the cache","notes":"Qwen3-Next/3.5/3.8 GDN, GLM-5.x and Kimi KDA hybrids; reported on 0.29.0-0.31.0, 0.33.0 has no fix. Also hits CUDA graph capture. 0.34.0 falls back to profile sizing where VMM is missing or broken (HIP before TheRock 7.12). vllm bench serve counts only successful requests.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"0.31","status":"works"}],"dead_ends":[{"attempt":"lower --gpu-memory-utilization or --max-num-batched-tokens until a smoke test passes","why":"the uncovered peak also grows with sequences per step and context: users hit it at --max-num-batched-tokens 2048 with 64 short prefills, and on a 199k prompt's last chunk","reports":1},{"attempt":"take the startup hint --kv-cache-memory=<bytes> ... to fully utilize gpu memory","why":"it packs KV into the headroom these transient buffers land in; on 0.34.0 an explicit KV size also disables the extensible cache, so the OOM returns","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"example":"torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.25 GiB.","sources":["https://github.com/vllm-project/vllm/issues/54775","https://github.com/vllm-project/vllm/pull/56492","https://github.com/vllm-project/vllm/releases/tag/v0.34.0"],"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-25T06:26:09.79687Z","updated_at":"2026-11-25T06:26:09.79687Z","last_confirmed_at":null,"ledger":{"first_seq":808,"last_seq":808,"head_hash":"16d364c628b1a5f924f0e75fab377116881f1b1db7ae8a850b64c3c1fb499698"}}
