[GH-ISSUE #5061] [Engine] DeepSeek V4.1: auto RAM store loads ~18-25 GB of duplicate experts when every expert is already on the GPU (Strix Halo) #2352

Open
opened 2026-11-04 01:58:38 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @boxwrench on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5061

Area

[Engine]

Desktop app, Terminal or source?

Source (a build)

What happened

On Strix Halo, every DeepSeek expert fits on the GPU, but the auto-sized RAM store still loads ~18–25 GB of experts into RAM, and nothing ever reads them.

The startup log shows all experts on the GPU:

ds4: CUDA0 layers [0, 42] + head: weights 6.43 GB, experts 73.45 GB (8064 of 8064 in VRAM), caches 0.03 GB

The store is filled anyway. That was 24.5 GB on one start and 17.8 GB on another:

ds4: RAM store: 3157 of the profile's hottest experts read in (24.5 GB) in 3.9 s

Every request afterwards logs CPU lane 0.0% of the experts. On this integrated GPU the store comes out of the same RAM the model lives in:

  • the engine process held 23.9 GB of anonymous RSS;
  • MemAvailable was ~16 GB of 128 GB.

Expected: with no experts on the CPU lane, the auto size should be 0 and no store should be built.

Same pack and build, adding --ssd-cache 0 (context also raised from 32768 to 131072):

auto store --ssd-cache 0
200-token greedy output (2 runs per arm) hash 1a1625e601 identical
Decode 45.07 / 45.11 tok/s 45.06 / 45.20 tok/s
MemAvailable ~16 GB ~35 GB

A 58,834-token prompt then read at 741 tok/s and answered correctly, and MemAvailable stayed at ~35 GB.

Likely cause: in init_store() (src/dsv41/ds4_model.cu), the auto-size branch already computes the CPU lane's expert bytes:

const double share = gpu_expert_share(&exp_b), lane_gb = exp_b * (1.0 - std::min(1.0, share)) / 1e9;

That value is only used for a log message, and the store is built even when lane_gb is 0.

Suggestion: when the store is auto-sized and lane_gb <= 0, skip it and log one line, for example "all experts are on the GPU: RAM store off". An explicit --ssd-cache N or DS4_STORE_GB would still be honoured.

Possibly related: #4605 (auto store sizing on Windows), but this one is about the store not being needed at all.

Smallest steps or command that reproduce it

strata-dsv41 --serve --pack <DeepSeek-V4.1-Flash IQ2_XXS pack> --gpus 0 --max-context 32768 --prefill-chunk 8192 --experts 6 --dspark auto

On a 128 GB Strix Halo, without --ssd-cache: the log shows "N of N in VRAM" followed by "RAM store: ... read in (xx GB)", and requests log "CPU lane 0.0%".

Reproduction status

Reproduced locally

Strata version

Source build of commit c62d5e3 · engine ds4-0.1

Graphics card, memory and system

Strix Halo (Radeon 8060S iGPU) · 128 GB unified RAM · Linux, ROCm 7.2.2

Model, size and settings

DeepSeek-V4.1-Flash IQ2_XXS · 32K context (then 128K for the comparison) · pictures off

Originally created by @boxwrench on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5061 ### Area [Engine] ### Desktop app, Terminal or source? Source (a build) ### What happened On Strix Halo, every DeepSeek expert fits on the GPU, but the auto-sized RAM store still loads ~18–25 GB of experts into RAM, and nothing ever reads them. The startup log shows all experts on the GPU: ``` ds4: CUDA0 layers [0, 42] + head: weights 6.43 GB, experts 73.45 GB (8064 of 8064 in VRAM), caches 0.03 GB ``` The store is filled anyway. That was 24.5 GB on one start and 17.8 GB on another: ``` ds4: RAM store: 3157 of the profile's hottest experts read in (24.5 GB) in 3.9 s ``` Every request afterwards logs `CPU lane 0.0% of the experts`. On this integrated GPU the store comes out of the same RAM the model lives in: - the engine process held 23.9 GB of anonymous RSS; - MemAvailable was ~16 GB of 128 GB. **Expected:** with no experts on the CPU lane, the auto size should be 0 and no store should be built. **Same pack and build, adding `--ssd-cache 0`** (context also raised from 32768 to 131072): | | auto store | `--ssd-cache 0` | |---|---|---| | 200-token greedy output (2 runs per arm) | hash `1a1625e601` | identical | | Decode | 45.07 / 45.11 tok/s | 45.06 / 45.20 tok/s | | MemAvailable | ~16 GB | ~35 GB | A 58,834-token prompt then read at 741 tok/s and answered correctly, and MemAvailable stayed at ~35 GB. **Likely cause:** in `init_store()` (`src/dsv41/ds4_model.cu`), the auto-size branch already computes the CPU lane's expert bytes: ```cpp const double share = gpu_expert_share(&exp_b), lane_gb = exp_b * (1.0 - std::min(1.0, share)) / 1e9; ``` That value is only used for a log message, and the store is built even when `lane_gb` is 0. **Suggestion:** when the store is auto-sized and `lane_gb <= 0`, skip it and log one line, for example "all experts are on the GPU: RAM store off". An explicit `--ssd-cache N` or `DS4_STORE_GB` would still be honoured. Possibly related: #4605 (auto store sizing on Windows), but this one is about the store not being needed at all. ### Smallest steps or command that reproduce it ``` strata-dsv41 --serve --pack <DeepSeek-V4.1-Flash IQ2_XXS pack> --gpus 0 --max-context 32768 --prefill-chunk 8192 --experts 6 --dspark auto ``` On a 128 GB Strix Halo, without `--ssd-cache`: the log shows "N of N in VRAM" followed by "RAM store: ... read in (xx GB)", and requests log "CPU lane 0.0%". ### Reproduction status Reproduced locally ### Strata version Source build of commit c62d5e3 · engine ds4-0.1 ### Graphics card, memory and system Strix Halo (Radeon 8060S iGPU) · 128 GB unified RAM · Linux, ROCm 7.2.2 ### Model, size and settings DeepSeek-V4.1-Flash IQ2_XXS · 32K context (then 128K for the comparison) · pictures off
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#2352
No description provided.