[GH-ISSUE #5464] [Engine] q36: report need/free MiB on expert-buffer and staging OOM #4847

Open
opened 2026-11-07 16:29:20 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @bahooo22 on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5464

Problem: a failed cudaMalloc in the q36 engine (place_experts) prints only "out of memory" with a line number; the user cannot tell whether to shrink context, MTP, slots, reserve or quant.
Environment: RTX 3060 Ti 8 GiB (sm_86), 32 GiB RAM, i7-4790K, Windows 11, CUDA 13.3; KAT Q5_K_S, 80k, q4_0 KV, --mtp 0.
Reproduce: load with --vram-reserve-mib 6000 so staging does not fit.
Expected: the error names the buffer and prints need/free MiB plus ctx/chunk/top_k/n_embd.
Actual: "out of memory: cudaMalloc failed", no sizes.
Proposal: wrap every device allocation in place_experts (L.blobs, H.slot_of_d, E.ecpu, E.d_miss, E.stage[0/1]) with one alloc_vram helper; diagnostic only.
Related: PR #5044 was closed as superseded, but only its serve part (b3c63386) landed upstream; the q36 diagnostic did not. Carried alone by PR <PR_URL> (branch pr-serve-oom-mib).

Originally created by @bahooo22 on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5464 Problem: a failed cudaMalloc in the q36 engine (place_experts) prints only "out of memory" with a line number; the user cannot tell whether to shrink context, MTP, slots, reserve or quant. Environment: RTX 3060 Ti 8 GiB (sm_86), 32 GiB RAM, i7-4790K, Windows 11, CUDA 13.3; KAT Q5_K_S, 80k, q4_0 KV, --mtp 0. Reproduce: load with --vram-reserve-mib 6000 so staging does not fit. Expected: the error names the buffer and prints need/free MiB plus ctx/chunk/top_k/n_embd. Actual: "out of memory: cudaMalloc failed", no sizes. Proposal: wrap every device allocation in place_experts (L.blobs, H.slot_of_d, E.ecpu, E.d_miss, E.stage[0/1]) with one alloc_vram helper; diagnostic only. Related: PR #5044 was closed as superseded, but only its serve part (b3c63386) landed upstream; the q36 diagnostic did not. Carried alone by PR <PR_URL> (branch pr-serve-oom-mib).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4847
No description provided.