[GH-ISSUE #60] OOM error with 16GB VRAM and 64GB RAM #34

Closed
opened 2026-11-04 01:39:12 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @shanoor on GitHub (Sep 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/60

I tried to run swift1.5 iq2_xs and it doesn't load, I get an OOM error despite the machine having 16GB VRAM and 64GB RAM. I think it might related to the fact that Windows only gives 32GB of shared gpu memory to my GPU (I don't know why).

Log :

load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks
load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024
load_hparams: more info: https://github.com/ggml-org/llama.cpp/issues/16842

strata-vision: warmed up at 1024 image tokens
strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)
strata generate: native pack: D:\llm\Strata-data\packs\swift-iq2_xs experts (largest blob 1.51 MB), token embedding type 23 in mapped host memory (322 MiB)
strata generate: 1466 MiB of weights loaded from D:\llm\Strata-data\packs\swift-iq2_xs (302 canonical tensors skipped: served natively)
strata generate: 300 native projection matrices, 1474.85 MiB of weights
strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.77 GiB of pinned RAM
strata generate: PLE on, table 320001536 rows of D:\llm\Strata-data\models\swift-IQ2_XS\Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf
strata generate: expert arena: locked 3688 MiB via working-set minimum + VirtualLock; cudaHostRegister of the whole arena FAILED (out of memory); 43 slices pinned (29 GiB); large pages refused for 35456548864 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages
strata generate: loaded 33.02 GiB at 2.08 GiB/s
strata mtp: draft layer loaded, 835 MiB of VRAM (experts 675, dense 111)
strata generate: profile D:\llm\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots
strata generate: experimental native Q5_K head, 337715200 bytes
strata generate: expert cache auto: 9.96 GiB free, 700 MiB reserved -> 6598 slots
strata generate: ExpertCache: cudaMalloc(9.28 GiB) failed: out of memory

I'm using Windows 10

Image Image Image
Originally created by @shanoor on GitHub (Sep 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/60 I tried to run swift1.5 iq2_xs and it doesn't load, I get an OOM error despite the machine having 16GB VRAM and 64GB RAM. I think it might related to the fact that Windows only gives 32GB of shared gpu memory to my GPU (I don't know why). Log : ```log load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024 load_hparams: more info: https://github.com/ggml-org/llama.cpp/issues/16842 strata-vision: warmed up at 1024 image tokens strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows) strata generate: native pack: D:\llm\Strata-data\packs\swift-iq2_xs experts (largest blob 1.51 MB), token embedding type 23 in mapped host memory (322 MiB) strata generate: 1466 MiB of weights loaded from D:\llm\Strata-data\packs\swift-iq2_xs (302 canonical tensors skipped: served natively) strata generate: 300 native projection matrices, 1474.85 MiB of weights strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.77 GiB of pinned RAM strata generate: PLE on, table 320001536 rows of D:\llm\Strata-data\models\swift-IQ2_XS\Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf strata generate: expert arena: locked 3688 MiB via working-set minimum + VirtualLock; cudaHostRegister of the whole arena FAILED (out of memory); 43 slices pinned (29 GiB); large pages refused for 35456548864 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages strata generate: loaded 33.02 GiB at 2.08 GiB/s strata mtp: draft layer loaded, 835 MiB of VRAM (experts 675, dense 111) strata generate: profile D:\llm\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots strata generate: experimental native Q5_K head, 337715200 bytes strata generate: expert cache auto: 9.96 GiB free, 700 MiB reserved -> 6598 slots strata generate: ExpertCache: cudaMalloc(9.28 GiB) failed: out of memory ``` I'm using Windows 10 <img width="692" height="101" alt="Image" src="https://github.com/user-attachments/assets/145bc881-571f-4826-9e94-7b058d874271" /> <img width="1214" height="329" alt="Image" src="https://github.com/user-attachments/assets/c4629e4e-4ee3-40ac-81d1-4544ce2eb854" /> <img width="548" height="204" alt="Image" src="https://github.com/user-attachments/assets/eefef6fd-84c3-452a-bd18-007077249e50" />
Author
Owner

@itguy327 commented on GitHub (Sep 28, 2026):

similar issue here

<!-- gh-comment-id:5872824940 --> @itguy327 commented on GitHub (Sep 28, 2026): similar issue here
Author
Owner

@technerd-official commented on GitHub (Sep 28, 2026):

same here have a single 3090 with 64gb system ram and still cant get it to run. (ExpertCache: cudaMalloc failed: out of memory).

<!-- gh-comment-id:5874859364 --> @technerd-official commented on GitHub (Sep 28, 2026): same here have a single 3090 with 64gb system ram and still cant get it to run. (ExpertCache: cudaMalloc failed: out of memory).
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

Thanks @shanoor - this is fixed as far as the engine can fix it, in v0.1.19.

The cause (not the 32 GB shared-memory figure; the engine copes with that by pinning in slices):

  • On Windows, memory on the graphics card also has to fit in Windows' commit, which is RAM plus the page file.
  • Your screenshot shows a commit limit of 64.5 GB with 63.7 GB of RAM, so the page file is about 1 GB or off.
  • With the 33 GB expert arena loaded, the 9.3 GB expert cache no longer fit, although the VRAM was free, and the engine stopped.

What 0.1.19 does:

  • The engine retries with a smaller cache instead of stopping, and says how much commit Windows has left.
  • Setup warns when the page file is under 4 GB.

The real fix on your PC: set the page file to System managed, then restart. The setting is under System > About > Advanced system settings > Performance > Advanced > Virtual memory. Then the cache can use all the free VRAM.

Could you update (git pull, then START-HERE.bat) and tell me whether it starts - with and without the page-file change? If it still fails, the lines the engine prints about the expert cache would help.

<!-- gh-comment-id:5874937331 --> @Niko1221 commented on GitHub (Sep 28, 2026): Thanks @shanoor - this is fixed as far as the engine can fix it, in [v0.1.19](https://github.com/Niko1221/Strata/releases/tag/v0.1.19). **The cause** (not the 32 GB shared-memory figure; the engine copes with that by pinning in slices): - On Windows, memory on the graphics card also has to fit in Windows' *commit*, which is RAM plus the page file. - Your screenshot shows a commit limit of 64.5 GB with 63.7 GB of RAM, so the page file is about 1 GB or off. - With the 33 GB expert arena loaded, the 9.3 GB expert cache no longer fit, although the VRAM was free, and the engine stopped. **What 0.1.19 does:** - The engine retries with a smaller cache instead of stopping, and says how much commit Windows has left. - Setup warns when the page file is under 4 GB. **The real fix on your PC:** set the page file to *System managed*, then restart. The setting is under System > About > Advanced system settings > Performance > Advanced > Virtual memory. Then the cache can use all the free VRAM. Could you update (`git pull`, then `START-HERE.bat`) and tell me whether it starts - with and without the page-file change? If it still fails, the lines the engine prints about the expert cache would help.
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

@technerd-official @itguy327 - 0.1.19 retries with a smaller expert cache instead of stopping, and on Windows the real fix is setting the page file to "System managed" (see my comment above). If it still fails after updating, please say which OS you're on and paste the lines starting with strata generate: expert cache.

<!-- gh-comment-id:5875080308 --> @Niko1221 commented on GitHub (Sep 28, 2026): @technerd-official @itguy327 - 0.1.19 retries with a smaller expert cache instead of stopping, and on Windows the real fix is setting the page file to "System managed" (see my comment above). If it still fails after updating, please say which OS you're on and paste the lines starting with `strata generate: expert cache`.
Author
Owner

@technerd-official commented on GitHub (Sep 28, 2026):

@technerd-official @itguy327 - 0.1.19 retries with a smaller expert cache instead of stopping, and on Windows the real fix is setting the page file to "System managed" (see my comment above). If it still fails after updating, please say which OS you're on and paste the lines starting with strata generate: expert cache.

ah okay thank you, I had to set pagefile to 0 because my SSD is already full with all these huge LLM models. Will try again after I allocate some more space on the SSD.

<!-- gh-comment-id:5875907722 --> @technerd-official commented on GitHub (Sep 28, 2026): > [@technerd-official](https://github.com/technerd-official) [@itguy327](https://github.com/itguy327) - 0.1.19 retries with a smaller expert cache instead of stopping, and on Windows the real fix is setting the page file to "System managed" (see my comment above). If it still fails after updating, please say which OS you're on and paste the lines starting with `strata generate: expert cache`. ah okay thank you, I had to set pagefile to 0 because my SSD is already full with all these huge LLM models. Will try again after I allocate some more space on the SSD.
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Closing: since 0.1.19 the engine retries with a smaller expert cache instead of stopping, and on Windows the page file needs room for the graphics driver (set it to "System managed"; setup warns when it is small). Thanks @technerd-official and @itguy327 - reopen if it still happens with some page file space.

<!-- gh-comment-id:5887675537 --> @Niko1221 commented on GitHub (Sep 29, 2026): Closing: since 0.1.19 the engine retries with a smaller expert cache instead of stopping, and on Windows the page file needs room for the graphics driver (set it to "System managed"; setup warns when it is small). Thanks @technerd-official and @itguy327 - reopen if it still happens with some page file space.
Author
Owner

@shanoor commented on GitHub (Sep 30, 2026):

I changed windows page file to system managed, same error. I then tried to force it to use between 4096 and 32768MB and still the same OOM error

load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks
load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024
load_hparams: more info: https://github.com/ggml-org/llama.cpp/issues/16842

strata-vision: warmed up at 1024 image tokens
strata generate: PCIe probe: 24.1 GB/s host->device -> pcie_frac 0.55 (default 0.55)
strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)
strata generate: native pack: D:\llm\Strata-data\packs\swift-iq2_xs experts (largest blob 1.51 MB), token embedding type 23 in mapped host memory (322 MiB)
strata generate: 1466 MiB of weights loaded from D:\llm\Strata-data\packs\swift-iq2_xs (302 canonical tensors skipped: served natively)
strata generate: 300 native projection matrices, 1474.85 MiB of weights
strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.42 GiB of pinned RAM
strata generate: PLE on, table 320001536 rows of D:\llm\Strata-data\models\swift-IQ2_XS\Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf
strata mtp: draft layer loaded, 820 MiB of VRAM (experts 675, dense 111), files read in 0.32 s (2421 MiB/s)
strata generate: expert arena: locked 2951 MiB via working-set minimum + VirtualLock; cudaHostRegister of the whole arena FAILED (out of memory); 44 slices pinned (30 GiB); large pages refused for 35456548864 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages
strata generate: loaded 33.02 GiB at 2.04 GiB/s
strata generate: profile D:\llm\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots
strata generate: native head upload: out of memory

Edit : well, by putting a 64GB limit on the pagefile, it works.

<!-- gh-comment-id:5908198595 --> @shanoor commented on GitHub (Sep 30, 2026): I changed windows page file to system managed, same error. I then tried to force it to use between 4096 and 32768MB and still the same OOM error ``` load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024 load_hparams: more info: https://github.com/ggml-org/llama.cpp/issues/16842 strata-vision: warmed up at 1024 image tokens strata generate: PCIe probe: 24.1 GB/s host->device -> pcie_frac 0.55 (default 0.55) strata generate: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows) strata generate: native pack: D:\llm\Strata-data\packs\swift-iq2_xs experts (largest blob 1.51 MB), token embedding type 23 in mapped host memory (322 MiB) strata generate: 1466 MiB of weights loaded from D:\llm\Strata-data\packs\swift-iq2_xs (302 canonical tensors skipped: served natively) strata generate: 300 native projection matrices, 1474.85 MiB of weights strata generate: KV streaming: 32768 of 65536 cells per QSA layer in VRAM, the K/V in 0.42 GiB of pinned RAM strata generate: PLE on, table 320001536 rows of D:\llm\Strata-data\models\swift-IQ2_XS\Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf strata mtp: draft layer loaded, 820 MiB of VRAM (experts 675, dense 111), files read in 0.32 s (2421 MiB/s) strata generate: expert arena: locked 2951 MiB via working-set minimum + VirtualLock; cudaHostRegister of the whole arena FAILED (out of memory); 44 slices pinned (30 GiB); large pages refused for 35456548864 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages strata generate: loaded 33.02 GiB at 2.04 GiB/s strata generate: profile D:\llm\Strata\data\expert-profile.bin: 24576 ranked pairs, built for 24576 slots strata generate: native head upload: out of memory ``` Edit : well, by putting a 64GB limit on the pagefile, it works.
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#34
No description provided.