[GH-ISSUE #250] Forced Single-GPU Low-RAM mode and miscalculated total memory limits despite theoretically available space #132

Closed
opened 2026-11-04 01:40:17 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Darmian03 on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/250

Firstly, I want to thank you for making this amazing project. Comparing Strata to Unsloth Desktop and LM Studio, I get around triple the generation speed on my machine, reaching an incredible 66 tokens per second (with 0 context). It's a phenomenal piece of software!

Description of the Issue

Currently, I am facing an issue where setup.sh forces a single-GPU Low-RAM mode for the IQ3_XXS size and completely disables my secondary card. When passing multi-GPU flags, the setup script overrides the user configuration, printing: [!] the low-RAM mode runs on one GPU: using GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) only.

Furthermore, if I attempt to run with --low-ram off, the script hard-refuses to boot, recommending that I downsize to Q2_0 or IQ2_XS, completely blocking IQ3_XXS.
When running:

./setup.sh --family swift --model IQ3_XXS --context 131072 --kv int8 --vision cpu --gpus 0,1 --layer-split auto --low-ram off

In the end I get

  [X]  IQ3_XXS needs about 60 GB of RAM; this PC has 46 GB
       choose Q2_0 or IQ2_XS, or add RAM

There is also a very confusing warning at the end of the boot sequence:
[strata] WARNING: RAM is tight - the model's experts take 40.0 GB of this PC's 46 GB, leaving 5.5 GB for everything else.
However, tools like vmtouch reveal that because Low-RAM mode was forced, less than 4% of the weights are actually cached in physical RAM (the system RAM is almost entirely unutilized, and the model is bottlenecked by active SSD faulting/streaming).

System Specifications

  • Strata Version: v0.1.27
  • OS: Ubuntu 26.04 LTS
  • Linux Kernel: 7.0.0-34-generic
  • CPU: Intel(R) Core(TM) Ultra 7 270K Plus (24 threads)
  • RAM: 48 GB DDR5 @ 6000Mhz (46 GB reported by OS)
  • GPU 0 (Main): NVIDIA GeForce RTX 5070 Ti (16 GB VRAM, Compute Capability 12.0)
  • GPU 1 (Secondary): NVIDIA GeForce RTX 3060 (12 GB VRAM)
  • CUDA Version: CUDA Toolkit 13.4 / Driver 595.91.07

The Memory Math: Expectation vs. Validation Script

The IQ3_XXS profile requires roughly 47.0 GB of total memory footprint.
My hardware pool easily covers this requirement when combining VRAM and system RAM:

  • Combined VRAM: 16 GB + 12 GB = 28 GB VRAM
  • Total System RAM: 48 GB DDR5

Subtracting ~8-9 GB for Ubuntu and background apps leaves around 26 GB VRAM + 32 GB RAM completely free (58 GB available fast memory). Despite this, the validation logic flags the setup as starved for memory and enforces the single-GPU SSD mapping mode.

Steps to Reproduce & Terminal Output

I ran the setup script with the following flags targeting 128K context and int8 KV cache:

./setup.sh --family swift --model IQ3_XXS --context 131072 --kv int8 --vision cpu --gpus 0,1 --layer-split auto --low-ram on

Full Terminal Output:

Strata - Qwen3.8-Flash-Next on a normal PC (a GPU + system RAM + CPU)

=== Step 1: checking your PC ===
  Your NVIDIA GPUs:
    GPU 0: NVIDIA GeForce RTX 5070 Ti, 16 GB VRAM - can be used
    GPU 1: NVIDIA GeForce RTX 3060, 12 GB VRAM - can be used
  [ok] GPUs: GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) + GPU 1 (NVIDIA GeForce RTX 3060, 12 GB) together (the model's layers are split across them)
  [ok] GPU: NVIDIA GeForce RTX 5070 Ti, 15.9 GB VRAM, compute capability 12.0, driver 595.91.07
  [ok] RAM: 46 GB
  [ok] CPU: Intel(R) Core(TM) Ultra 7 270K Plus (AVX2)

=== Step 2: your choices ===
  [ok] model: Swift 1.5
  Its license: Swift Open License 1.0: https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-Flash-Next-GSQ-RCO-GGUF

  1) Q2_0     2-bit, the fastest; download 66 GB, uses ~34 GB of RAM   <- needs 48 GB RAM, you have 46
  2) IQ2_XS   2-bit i-quant, a little better quality, close in speed; download 68 GB, uses ~36 GB of RAM   <- needs 48 GB RAM, you have 46
  3) IQ3_XXS  3-bit i-quant, better quality, slower (more CPU work per token); download 76 GB, uses ~43 GB of RAM   <- fits in the low-RAM mode (the GPU holds ~25%)
  [!]  the low-RAM mode runs on one GPU: using GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) only
  [ok] low-RAM mode: IQ3_XXS's experts (43 GB) are read from the model folder through the OS file cache instead of a copy in RAM (46 GB); the GPU holds ~25% of them
  [!]  most of the experts are read from the SSD while it answers: expect it to be much slower than with enough RAM (a faster SSD and a smaller size help)
  [ok] size: IQ3_XXS
  [ok] context: 131072 tokens
  [ok] KV cache: 8-bit
  [ok] images: on (encoder on the CPU)

... [Steps 3 to 7 skipped for brevity] ...

loading the vision encoder ...
loading the model (the first start takes a minute or two) ...
[strata] starting the engine: reading the model's weights ...
[strata] loading the experts into RAM (about 40 GB) and locking part of them for the GPU.
         YOUR PC CAN BE SLOW OR STOP RESPONDING FOR 1-3 MINUTES NOW - this is normal.
         Please wait and don't close this window; the browser opens when it is ready.
[strata] filling the GPU's expert cache (4221 experts, 6.87 GiB of VRAM) ...
[strata] almost ready ...
[strata] WARNING: RAM is tight - the model's experts take 40.0 GB of this PC's 46 GB, leaving 5.5 GB for everything else. Linux may stop the engine in the middle of an answer. Close other programs, or run START-HERE --setup and pick a smaller size (Q2_0 / IQ2_XS).
ready: http://127.0.0.1:8080/v1

Diagnostic Verification via vmtouch

While the engine was running, I verified memory mapping residency using vmtouch. Only 3.43% of the model is in active physical RAM cache:

danielv@dv-ubuntu:~\$ vmtouch -v /home/danielv/Strata-data/models/swift-IQ3_XXS/
...
           Files: 4
     Directories: 1
  Resident Pages: 636781/18546407  2G/70G  3.43%
         Elapsed: 0.18116 seconds

Misconfiguration, Bug, or Intended Behavior?

I am personally confused about whether I am misconfiguring the setup flags, or if this behavior is an intended design limitation or a bug in the script's multi-GPU logic. Given that the hardware meets the required 47 GB footprint through the combined VRAM and RAM pools, it feels like a bug that the script evaluates the system's memory capacity using a strict single-GPU threshold and forces a performance-degrading SSD streaming mode, but I may be entirely wrong.

Originally created by @Darmian03 on GitHub (Sep 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/250 Firstly, I want to thank you for making this amazing project. Comparing Strata to Unsloth Desktop and LM Studio, I get around triple the generation speed on my machine, reaching an incredible 66 tokens per second (with 0 context). It's a phenomenal piece of software! ### Description of the Issue Currently, I am facing an issue where `setup.sh` forces a single-GPU Low-RAM mode for the `IQ3_XXS` size and completely disables my secondary card. When passing multi-GPU flags, the setup script overrides the user configuration, printing: `[!] the low-RAM mode runs on one GPU: using GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) only`. Furthermore, if I attempt to run with `--low-ram off`, the script hard-refuses to boot, recommending that I downsize to `Q2_0` or `IQ2_XS`, completely blocking `IQ3_XXS`. When running: ```bash ./setup.sh --family swift --model IQ3_XXS --context 131072 --kv int8 --vision cpu --gpus 0,1 --layer-split auto --low-ram off ``` In the end I get ```text [X] IQ3_XXS needs about 60 GB of RAM; this PC has 46 GB choose Q2_0 or IQ2_XS, or add RAM ``` There is also a very confusing warning at the end of the boot sequence: `[strata] WARNING: RAM is tight - the model's experts take 40.0 GB of this PC's 46 GB, leaving 5.5 GB for everything else.` However, tools like `vmtouch` reveal that because Low-RAM mode was forced, less than 4% of the weights are actually cached in physical RAM (the system RAM is almost entirely unutilized, and the model is bottlenecked by active SSD faulting/streaming). ### System Specifications - **Strata Version:** v0.1.27 - **OS:** Ubuntu 26.04 LTS - **Linux Kernel:** 7.0.0-34-generic - **CPU:** Intel(R) Core(TM) Ultra 7 270K Plus (24 threads) - **RAM:** 48 GB DDR5 @ 6000Mhz (46 GB reported by OS) - **GPU 0 (Main):** NVIDIA GeForce RTX 5070 Ti (16 GB VRAM, Compute Capability 12.0) - **GPU 1 (Secondary):** NVIDIA GeForce RTX 3060 (12 GB VRAM) - **CUDA Version:** CUDA Toolkit 13.4 / Driver 595.91.07 ### The Memory Math: Expectation vs. Validation Script The `IQ3_XXS` profile requires roughly **47.0 GB** of total memory footprint. My hardware pool easily covers this requirement when combining VRAM and system RAM: - **Combined VRAM:** 16 GB + 12 GB = 28 GB VRAM - **Total System RAM:** 48 GB DDR5 Subtracting ~8-9 GB for Ubuntu and background apps leaves around **26 GB VRAM + 32 GB RAM completely free (58 GB available fast memory)**. Despite this, the validation logic flags the setup as starved for memory and enforces the single-GPU SSD mapping mode. ### Steps to Reproduce & Terminal Output I ran the setup script with the following flags targeting 128K context and int8 KV cache: ```bash ./setup.sh --family swift --model IQ3_XXS --context 131072 --kv int8 --vision cpu --gpus 0,1 --layer-split auto --low-ram on ``` **Full Terminal Output:** ```text Strata - Qwen3.8-Flash-Next on a normal PC (a GPU + system RAM + CPU) === Step 1: checking your PC === Your NVIDIA GPUs: GPU 0: NVIDIA GeForce RTX 5070 Ti, 16 GB VRAM - can be used GPU 1: NVIDIA GeForce RTX 3060, 12 GB VRAM - can be used [ok] GPUs: GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) + GPU 1 (NVIDIA GeForce RTX 3060, 12 GB) together (the model's layers are split across them) [ok] GPU: NVIDIA GeForce RTX 5070 Ti, 15.9 GB VRAM, compute capability 12.0, driver 595.91.07 [ok] RAM: 46 GB [ok] CPU: Intel(R) Core(TM) Ultra 7 270K Plus (AVX2) === Step 2: your choices === [ok] model: Swift 1.5 Its license: Swift Open License 1.0: https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-Flash-Next-GSQ-RCO-GGUF 1) Q2_0 2-bit, the fastest; download 66 GB, uses ~34 GB of RAM <- needs 48 GB RAM, you have 46 2) IQ2_XS 2-bit i-quant, a little better quality, close in speed; download 68 GB, uses ~36 GB of RAM <- needs 48 GB RAM, you have 46 3) IQ3_XXS 3-bit i-quant, better quality, slower (more CPU work per token); download 76 GB, uses ~43 GB of RAM <- fits in the low-RAM mode (the GPU holds ~25%) [!] the low-RAM mode runs on one GPU: using GPU 0 (NVIDIA GeForce RTX 5070 Ti, 16 GB) only [ok] low-RAM mode: IQ3_XXS's experts (43 GB) are read from the model folder through the OS file cache instead of a copy in RAM (46 GB); the GPU holds ~25% of them [!] most of the experts are read from the SSD while it answers: expect it to be much slower than with enough RAM (a faster SSD and a smaller size help) [ok] size: IQ3_XXS [ok] context: 131072 tokens [ok] KV cache: 8-bit [ok] images: on (encoder on the CPU) ... [Steps 3 to 7 skipped for brevity] ... loading the vision encoder ... loading the model (the first start takes a minute or two) ... [strata] starting the engine: reading the model's weights ... [strata] loading the experts into RAM (about 40 GB) and locking part of them for the GPU. YOUR PC CAN BE SLOW OR STOP RESPONDING FOR 1-3 MINUTES NOW - this is normal. Please wait and don't close this window; the browser opens when it is ready. [strata] filling the GPU's expert cache (4221 experts, 6.87 GiB of VRAM) ... [strata] almost ready ... [strata] WARNING: RAM is tight - the model's experts take 40.0 GB of this PC's 46 GB, leaving 5.5 GB for everything else. Linux may stop the engine in the middle of an answer. Close other programs, or run START-HERE --setup and pick a smaller size (Q2_0 / IQ2_XS). ready: http://127.0.0.1:8080/v1 ``` ### Diagnostic Verification via `vmtouch` While the engine was running, I verified memory mapping residency using `vmtouch`. Only 3.43% of the model is in active physical RAM cache: ```text danielv@dv-ubuntu:~\$ vmtouch -v /home/danielv/Strata-data/models/swift-IQ3_XXS/ ... Files: 4 Directories: 1 Resident Pages: 636781/18546407 2G/70G 3.43% Elapsed: 0.18116 seconds ``` ### Misconfiguration, Bug, or Intended Behavior? I am personally confused about whether I am misconfiguring the setup flags, or if this behavior is an intended design limitation or a bug in the script's multi-GPU logic. Given that the hardware meets the required 47 GB footprint through the combined VRAM and RAM pools, it feels like a bug that the script evaluates the system's memory capacity using a strict single-GPU threshold and forces a performance-degrading SSD streaming mode, but I may be entirely wrong.
Author
Owner

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

The single GPU is by design in low-RAM mode (the engine can't combine it with a layer split yet), but the messages don't say so. 0.1.31 explains why and shows the RAM math, and --low-ram off --yes proceeds instead of failing on the prompt. 0.1.30 already picks the resident low-RAM variant on your machine, so no SSD streaming there.

<!-- gh-comment-id:5917512650 --> @Niko1221 commented on GitHub (Sep 30, 2026): The single GPU is by design in low-RAM mode (the engine can't combine it with a layer split yet), but the messages don't say so. 0.1.31 explains why and shows the RAM math, and `--low-ram off --yes` proceeds instead of failing on the prompt. 0.1.30 already picks the resident low-RAM variant on your machine, so no SSD streaming there.
Author
Owner

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

I ran some comprehensive tests on version 0.1.30 using a large 10K token context to see how the different --low-ram profiles handle prompt reading (prefill) versus token generation (decode). Here is what I found on my setup:

  1. --low-ram resident (Average Decode: 52.7 tps)
  • System RAM allocation works as intended and holds the experts in physical memory (verified via free -h) - this didn't happen in previous versions. It used around 36GB of RAM.
  • The text output is stable and completely coherent over long generations (>12,000 tokens).
  • Token generation is a bit slower here, likely due to the overhead of moving expert data from system RAM over the PCIe bus to the single active GPU.
  1. --low-ram on (Prefill: 1,117 tok/s | Average Decode: 51.0 to 56.5 tps)
  • This correctly auto-picks the new resident mapping layout in v0.1.30.
  • Prompt Ingestion (Prefill): Very fast, reading 10,071 tokens in just 9 seconds. Pre-loading the remaining experts into system memory definitely fixes the slow ingestion from a cold file cache.
  • Note on Behavior: Over long contexts, the model sometimes got stuck in a token repetition loop during the 'thinking' phase, but the generation speed numbers stayed stable. About the looping problem - I ran the same commands as before and used the webui. Didn't set thinking mode or any of such setting.
  1. --low-ram mmap (Prefill: 781 tok/s | Average Decode: 66.5 to 66.9 tps)
  • Prompt Ingestion (Prefill): Slower than resident mode, taking 13 seconds to read the 10,070 context tokens due to initial page faults.
  • Token Generation (Decode): Consistently yields the highest speed on my machine, hitting up to 66.9 tps.
  • Note on Behavior: The same token repetition loop during extended 'thinking' tracks appeared here as well, similar to the --low-ram on mode.

Takeaway regarding Storage & RAM:
Interestingly, mmap delivers about 23% higher decoding speed than the new resident mode during active generation. Since my OS drive is a Kingston KC3000 PCIe 4.0 NVMe SSD (which has built-in hardware DRAM), the standard Linux kernel page cache seems to handle the MoE expert paging with very low latency once the initial prompt is read.

To sum up: the new resident logic works great for fixing the multi-thousand token prefill bottleneck. However, for actual token decoding, standard mmap is still noticeably faster on this specific DDR5 and DRAM-cached SSD setup. This may works anly in this specific scenario and I am unfortunately unable to run this benchmark on another machine. I am open to run other benchmarks if you would like though.

Looking forward to testing how the upcoming v0.1.31 multi-GPU layer split changes these numbers!

<!-- gh-comment-id:5919419865 --> @Darmian03 commented on GitHub (Sep 30, 2026): I ran some comprehensive tests on version 0.1.30 using a large 10K token context to see how the different `--low-ram` profiles handle prompt reading (prefill) versus token generation (decode). Here is what I found on my setup: 1. `--low-ram resident` (Average Decode: 52.7 tps) - System RAM allocation works as intended and holds the experts in physical memory (verified via `free -h`) - this didn't happen in previous versions. It used around 36GB of RAM. - The text output is stable and completely coherent over long generations (>12,000 tokens). - Token generation is a bit slower here, likely due to the overhead of moving expert data from system RAM over the PCIe bus to the single active GPU. 2. `--low-ram on` (Prefill: 1,117 tok/s | Average Decode: 51.0 to 56.5 tps) - This correctly auto-picks the new resident mapping layout in v0.1.30. - Prompt Ingestion (Prefill): Very fast, reading 10,071 tokens in just 9 seconds. Pre-loading the remaining experts into system memory definitely fixes the slow ingestion from a cold file cache. - Note on Behavior: Over long contexts, the model sometimes got stuck in a token repetition loop during the 'thinking' phase, but the generation speed numbers stayed stable. About the looping problem - I ran the same commands as before and used the webui. Didn't set thinking mode or any of such setting. 3. `--low-ram mmap` (Prefill: 781 tok/s | Average Decode: 66.5 to 66.9 tps) - Prompt Ingestion (Prefill): Slower than resident mode, taking 13 seconds to read the 10,070 context tokens due to initial page faults. - Token Generation (Decode): Consistently yields the highest speed on my machine, hitting up to 66.9 tps. - Note on Behavior: The same token repetition loop during extended 'thinking' tracks appeared here as well, similar to the `--low-ram on` mode. Takeaway regarding Storage & RAM: Interestingly, `mmap` delivers about 23% higher decoding speed than the new `resident` mode during active generation. Since my OS drive is a Kingston KC3000 PCIe 4.0 NVMe SSD (which has built-in hardware DRAM), the standard Linux kernel page cache seems to handle the MoE expert paging with very low latency once the initial prompt is read. To sum up: the new `resident` logic works great for fixing the multi-thousand token prefill bottleneck. However, for actual token decoding, standard `mmap` is still noticeably faster on this specific DDR5 and DRAM-cached SSD setup. This may works anly in this specific scenario and I am unfortunately unable to run this benchmark on another machine. I am open to run other benchmarks if you would like though. Looking forward to testing how the upcoming v0.1.31 multi-GPU layer split changes these numbers!
Author
Owner

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

0.1.31: setup says why the low-RAM mode uses one GPU (the engine can't combine it with a layer split yet) and shows the RAM math; --low-ram off --yes installs without asking.

<!-- gh-comment-id:5925212380 --> @Niko1221 commented on GitHub (Oct 1, 2026): [0.1.31](https://github.com/Niko1221/Strata/releases/tag/v0.1.31): setup says why the low-RAM mode uses one GPU (the engine can't combine it with a layer split yet) and shows the RAM math; `--low-ram off --yes` installs without asking.
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#132
No description provided.