[GH-ISSUE #620] IQ3_S: "native head upload: out of memory" at startup when the desktop runs on a second GPU (more free VRAM on the card) #293

Closed
opened 2026-11-04 01:41:43 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @gu-feng on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/620

<html>

Environment

  • Engine 0.1.38 ready-made release (BUILD.json: version 0.1.38, source "release", cuda 13.0, archs include 120), Windows 11 Pro build 26200
  • NVIDIA RTX 5060 Ti 16 GB (sm_120) — the only CUDA device; the desktop runs on the iGPU (Intel UHD 770), so the RTX card has no display attached and sits at 0 MiB used before the model starts
  • i5-14600K, 64 GB RAM

Model and args

IQ3_S (GSQ-RCO):

--expert-cache auto --prefill auto --spec 4 --max-context 131072 --kv int8 --vision --vram-reserve-mib 700

Notably without --kv-resident — a config regeneration had dropped it, so the full 131072-cell KV lived in VRAM.

Symptom

Startup dies right after the arena load:

strata generate: expert arena read unbuffered (0 of 16 probe reads from the file cache; 6.3 GiB available, 51.1 GiB of files)
strata generate: expert arena: VirtualLock stopped at 0 of 1302 MiB (error 87); cudaHostRegister of the whole arena
                 FAILED (out of memory); 47 slices pinned (45 GiB); large pages (2097152 B)
strata generate: loaded 46.84 GiB at 4.80 GiB/s
strata generate: native head upload: out of memory

The experimental native Q5_K head, 521472000 bytes line never prints — the cudaMalloc of the head (521 MB) fails, and the process exits before ready.

The strange part

It reproduces when the card has more free VRAM, not less:

Display cable dGPU VRAM before start Result
Monitor on the iGPU (desktop off the card) 0 MiB used "native head upload: out of memory"
Monitor on the RTX card (desktop takes ~1 GB) ~1 GB used starts fine

With --kv-resident 32768 added (the KV streamed to pinned RAM, ~2 GB of VRAM freed), the same start with the display on the iGPU succeeds:

strata generate: experimental native Q5_K head, 521472000 bytes
strata generate: expert cache auto: 9.12 GiB free, 700 MiB reserved (+218 MiB for the draft head) -> 3318 slots
strata generate: expert cache 3771 slots, 7.23 GiB of VRAM; policy is
strata serve: 514 MiB of VRAM free with everything loaded

So the head's allocation OOMs only in the combination with more free VRAM and no KV streaming — which reads like the ~521 MiB head is not accounted for by the expert-cache sizing in this configuration ("THE HEAD BEFORE THE CACHE" from 0.1.36's notes says the head is loaded before the sizing, but on this card it OOMs anyway).

Happy to attach the full strata-iq3_s.log of the failing start or test any candidate fix.

</html>
Originally created by @gu-feng on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/620 <html> <body> <h2 id="environment" class="atx">Environment</h2> <ul> <li>Engine 0.1.38 ready-made release (<code>BUILD.json</code>: version 0.1.38, source &quot;release&quot;, cuda 13.0, archs include 120), Windows 11 Pro build 26200</li> <li>NVIDIA RTX 5060 Ti 16 GB (sm_120) — the only CUDA device; <strong>the desktop runs on the iGPU</strong> (Intel UHD 770), so the RTX card has no display attached and sits at 0 MiB used before the model starts</li> <li>i5-14600K, 64 GB RAM</li> </ul> <h2 id="model-and-args" class="atx">Model and args</h2> <p>IQ3_S (GSQ-RCO):</p> <pre><code class="fenced-code-block">--expert-cache auto --prefill auto --spec 4 --max-context 131072 --kv int8 --vision --vram-reserve-mib 700</code></pre> <p>Notably <strong>without <code>--kv-resident</code></strong> — a config regeneration had dropped it, so the full 131072-cell KV lived in VRAM.</p> <h2 id="symptom" class="atx">Symptom</h2> <p>Startup dies right after the arena load:</p> <pre><code class="fenced-code-block">strata generate: expert arena read unbuffered (0 of 16 probe reads from the file cache; 6.3 GiB available, 51.1 GiB of files) strata generate: expert arena: VirtualLock stopped at 0 of 1302 MiB (error 87); cudaHostRegister of the whole arena FAILED (out of memory); 47 slices pinned (45 GiB); large pages (2097152 B) strata generate: loaded 46.84 GiB at 4.80 GiB/s strata generate: native head upload: out of memory</code></pre> <p>The <code>experimental native Q5_K head, 521472000 bytes</code> line never prints — the cudaMalloc of the head (521 MB) fails, and the process exits before ready.</p> <h2 id="the-strange-part" class="atx">The strange part</h2> <p>It reproduces when the card has <strong>more</strong> free VRAM, not less:</p> Display cable | dGPU VRAM before start | Result -- | -- | -- Monitor on the iGPU (desktop off the card) | 0 MiB used | "native head upload: out of memory" Monitor on the RTX card (desktop takes ~1 GB) | ~1 GB used | starts fine <p>With <code>--kv-resident 32768</code> added (the KV streamed to pinned RAM, ~2 GB of VRAM freed), the same start with the display on the iGPU succeeds:</p> <pre><code class="fenced-code-block">strata generate: experimental native Q5_K head, 521472000 bytes strata generate: expert cache auto: 9.12 GiB free, 700 MiB reserved (+218 MiB for the draft head) -&gt; 3318 slots strata generate: expert cache 3771 slots, 7.23 GiB of VRAM; policy is strata serve: 514 MiB of VRAM free with everything loaded</code></pre> <p>So the head&#39;s allocation OOMs only in the combination with more free VRAM and no KV streaming — which reads like the ~521 MiB head is not accounted for by the expert-cache sizing in this configuration (&quot;THE HEAD BEFORE THE CACHE&quot; from 0.1.36&#39;s notes says the head is loaded before the sizing, but on this card it OOMs anyway).</p> <p>Happy to attach the full <code>strata-iq3_s.log</code> of the failing start or test any candidate fix.</p> <!--EndFragment--> </body> </html>
Author
Owner

@Niko1221 commented on GitHub (Oct 4, 2026):

Fixed in 0.1.39. WDDM refused the head's allocation after the expert arena registered its ~45 GiB of host pages, even with GiBs of VRAM free. The native head (and the logits buffer) are now allocated before that registration, as the draft layer already was. They are still allocated before the expert cache is sized, so the slots are unchanged. A failure there now prints the free and total VRAM. About the lost --kv-resident: setup turns KV streaming on from a 64K context only when the RAM holds the model plus the KV cache's RAM (with IQ3_S at 128K that is ~65 GB, just above a 64 GB PC), and it did that without a word. It now says so and points to --kv-streaming on. If 0.1.39 still fails with the display on the iGPU, please attach the full strata-iq3_s.log of that start.

<!-- gh-comment-id:5979957337 --> @Niko1221 commented on GitHub (Oct 4, 2026): Fixed in 0.1.39. WDDM refused the head's allocation after the expert arena registered its ~45 GiB of host pages, even with GiBs of VRAM free. The native head (and the logits buffer) are now allocated before that registration, as the draft layer already was. They are still allocated before the expert cache is sized, so the slots are unchanged. A failure there now prints the free and total VRAM. About the lost `--kv-resident`: setup turns KV streaming on from a 64K context only when the RAM holds the model plus the KV cache's RAM (with IQ3_S at 128K that is ~65 GB, just above a 64 GB PC), and it did that without a word. It now says so and points to `--kv-streaming on`. If 0.1.39 still fails with the display on the iGPU, please attach the full `strata-iq3_s.log` of that start.
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#293
No description provided.