[GH-ISSUE #5027] [TUI] strata launch --set mmap-experts=off never reaches strata-dsv41: DeepSeek reads the experts in place (about 40% slower decode) #2326

Closed
opened 2026-11-04 01:58:27 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @erikash on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5027

Area

[TUI] (the Terminal: strata launch, connect, monitor)

Desktop app, Terminal or source?

Docker

What happened

With DeepSeek, strata launch --set mmap-experts=off (in Docker: STRATA_SET="mmap-experts=off ...") never reaches strata-dsv41. The engine starts with no --mmap-experts at all, so it uses its default and reads the experts in place from the model files instead of copying them into RAM. That costs about 40% of decode on my machine.

The launcher treats --mmap-experts as a bare switch for every engine, because it is in tune_knobs.BOOL_FLAGS, and settings.as_argv_changes turns off into "remove the flag". That is right for the Qwen engine, where --mmap-experts takes no value. strata-dsv41 reads it with a word, --mmap-experts on|off|auto (src/dsv41/ds4_main.cpp), and its default is on. It is the same kind of problem #3959 fixed for --dspark.

Engine command line from the launch, inside the container (/proc/<pid>/cmdline):

strata-dsv41 --serve --pack /data/Strata-data/packs/deepseek-v4.1-flash-ist-das-2.25bpw --max-context 262144 --eos 1 --vision on --dspark-conf 0.65 --cpu-threads 48 --ssd-cache 0 --dspark on --experts 5

--cpu-threads, --ssd-cache, --dspark and --experts from the same STRATA_SET arrive; --mmap-experts off does not.

Expected: --mmap-experts off on the engine line.

Same files, same container image, same card, run once each (greedy, thinking off, 400 tokens out; the last row is a 16.9K-token prompt, then 300 tokens out). Decode in tokens per second, two rounds each:

code explain story after 16.9K prompt 16.9K prompt read
as launched (no --mmap-experts) 26.6 / 25.4 21.5 / 21.3 19.0 / 17.6 23.5 / 25.2 472 / 455
same engine line + --mmap-experts off 42.6 / 41.0 34.2 / 33.9 29.6 / 28.1 38.8 / 40.1 575 / 639

For the second row I started serve/server.py from the image by hand, with the launch's own run config (/data/state/strata/launch/ds.json) plus --mmap-experts off and nothing else changed.

From reading the code, not run: --set mmap-experts=on for DeepSeek appends a bare --mmap-experts. strata-dsv41 would then take the next argument as its word, or stop with "--mmap-experts needs a value" when the flag is last.

Smallest steps or command that reproduce it

docker run --gpus all -v strata-data:/data \
  -e FAMILY=deepseek41 -e MODEL=IST-DAS-2.25bpw -e STRATA_SET="mmap-experts=off" \
  ghcr.io/niko1221/strata:0.2.9-cuda13
# then, in the container: the strata-dsv41 command line has no --mmap-experts

Without a GPU: derive_config on a DeepSeek run config with extra={"--mmap-experts": "off"} returns args without --mmap-experts. I checked this inside the image (its Python, its code) against the run config the launch wrote.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.9 · engine 0.1.55 (ghcr.io/niko1221/strata:0.2.9-cuda13; the DeepSeek engine package 0.1.55-linux-x86_64-cuda-cuda13 that the launch downloaded)

Graphics card, memory and system

RTX 3090 24 GB · 157 GiB RAM · AMD EPYC 7702P (64 vCPUs) · Ubuntu 26.04.1 (VM), Docker

Model, size and settings

DeepSeek-V4.1-Flash IST-DAS-2.25bpw · 256K context · pictures on · STRATA_SET="mmap-experts=off cpu-threads=48 ssd-cache=0 dspark=on experts=5"

Logs

The engine command line above is the relevant part. I have no error to show: the engine starts and runs, just with the experts read in place.

I have a fix with a regression test and will open a PR that links here.

Originally created by @erikash on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5027 ### Area [TUI] (the Terminal: strata launch, connect, monitor) ### Desktop app, Terminal or source? Docker ### What happened With DeepSeek, `strata launch --set mmap-experts=off` (in Docker: `STRATA_SET="mmap-experts=off ..."`) never reaches strata-dsv41. The engine starts with no `--mmap-experts` at all, so it uses its default and reads the experts in place from the model files instead of copying them into RAM. That costs about 40% of decode on my machine. The launcher treats `--mmap-experts` as a bare switch for every engine, because it is in `tune_knobs.BOOL_FLAGS`, and `settings.as_argv_changes` turns `off` into "remove the flag". That is right for the Qwen engine, where `--mmap-experts` takes no value. strata-dsv41 reads it with a word, `--mmap-experts on|off|auto` (`src/dsv41/ds4_main.cpp`), and its default is on. It is the same kind of problem #3959 fixed for `--dspark`. Engine command line from the launch, inside the container (`/proc/<pid>/cmdline`): ``` strata-dsv41 --serve --pack /data/Strata-data/packs/deepseek-v4.1-flash-ist-das-2.25bpw --max-context 262144 --eos 1 --vision on --dspark-conf 0.65 --cpu-threads 48 --ssd-cache 0 --dspark on --experts 5 ``` `--cpu-threads`, `--ssd-cache`, `--dspark` and `--experts` from the same `STRATA_SET` arrive; `--mmap-experts off` does not. Expected: `--mmap-experts off` on the engine line. Same files, same container image, same card, run once each (greedy, thinking off, 400 tokens out; the last row is a 16.9K-token prompt, then 300 tokens out). Decode in tokens per second, two rounds each: | | code | explain | story | after 16.9K prompt | 16.9K prompt read | |---|---|---|---|---|---| | as launched (no `--mmap-experts`) | 26.6 / 25.4 | 21.5 / 21.3 | 19.0 / 17.6 | 23.5 / 25.2 | 472 / 455 | | same engine line + `--mmap-experts off` | 42.6 / 41.0 | 34.2 / 33.9 | 29.6 / 28.1 | 38.8 / 40.1 | 575 / 639 | For the second row I started `serve/server.py` from the image by hand, with the launch's own run config (`/data/state/strata/launch/ds.json`) plus `--mmap-experts off` and nothing else changed. From reading the code, not run: `--set mmap-experts=on` for DeepSeek appends a bare `--mmap-experts`. strata-dsv41 would then take the next argument as its word, or stop with "--mmap-experts needs a value" when the flag is last. ### Smallest steps or command that reproduce it ```sh docker run --gpus all -v strata-data:/data \ -e FAMILY=deepseek41 -e MODEL=IST-DAS-2.25bpw -e STRATA_SET="mmap-experts=off" \ ghcr.io/niko1221/strata:0.2.9-cuda13 # then, in the container: the strata-dsv41 command line has no --mmap-experts ``` Without a GPU: `derive_config` on a DeepSeek run config with `extra={"--mmap-experts": "off"}` returns args without `--mmap-experts`. I checked this inside the image (its Python, its code) against the run config the launch wrote. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.9 · engine 0.1.55 (ghcr.io/niko1221/strata:0.2.9-cuda13; the DeepSeek engine package 0.1.55-linux-x86_64-cuda-cuda13 that the launch downloaded) ### Graphics card, memory and system RTX 3090 24 GB · 157 GiB RAM · AMD EPYC 7702P (64 vCPUs) · Ubuntu 26.04.1 (VM), Docker ### Model, size and settings DeepSeek-V4.1-Flash IST-DAS-2.25bpw · 256K context · pictures on · `STRATA_SET="mmap-experts=off cpu-threads=48 ssd-cache=0 dspark=on experts=5"` ### Logs The engine command line above is the relevant part. I have no error to show: the engine starts and runs, just with the experts read in place. I have a fix with a regression test and will open a PR that links here.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello erikash,

Thank you for the report and PR #5028. In Strata 0.2.11 --set mmap-experts=on|off|auto keeps its word for DeepSeek (strata-dsv41) and reaches the engine, while for Qwen it stays a bare switch. It also holds through a second launch. We reproduced the dropped value on the old code. We did not measure the decode speed difference you saw on your container. If the experts are still read in place with off on 0.2.11, please send the engine command line from the launch log.

The Strata project

<!-- gh-comment-id:6658447745 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello erikash, Thank you for the report and PR #5028. In Strata 0.2.11 `--set mmap-experts=on|off|auto` keeps its word for DeepSeek (strata-dsv41) and reaches the engine, while for Qwen it stays a bare switch. It also holds through a second launch. We reproduced the dropped value on the old code. We did not measure the decode speed difference you saw on your container. If the experts are still read in place with `off` on 0.2.11, please send the engine command line from the launch log. The Strata project
Author
Owner

@erikash commented on GitHub (Nov 5, 2026):

Confirmed on 0.2.11, thanks. I used ghcr.io/niko1221/strata:0.2.11-cuda13 (engine 0.1.57) on the RTX 3090 with FAMILY=deepseek41 MODEL=IST-DAS-2.25bpw and STRATA_SET="mmap-experts=off cpu-threads=48 ssd-cache=0 dspark=on experts=5". The strata-dsv41 command line now has --mmap-experts off, and the engine copied 15,203 of the CPU lane's 15,342 experts into RAM. With mmap-experts=on it gets --mmap-experts on, so the word comes through in both cases.

I ran it twice in the same container with the same prompts, changing only that flag (greedy, thinking off, 400 tokens out, two rounds). Decode in tokens per second:

code explain story 19.6K prompt read
mmap-experts=on (in place) 20.6 / 21.9 18.4 / 18.9 17.1 / 16.9 726
mmap-experts=off 32.5 / 34.7 29.7 / 29.1 26.9 / 26.7 730

That's about +58% decode, in line with what I measured in the report. Prompt reading is the same either way.

<!-- gh-comment-id:6661342387 --> @erikash commented on GitHub (Nov 5, 2026): Confirmed on 0.2.11, thanks. I used `ghcr.io/niko1221/strata:0.2.11-cuda13` (engine 0.1.57) on the RTX 3090 with `FAMILY=deepseek41 MODEL=IST-DAS-2.25bpw` and `STRATA_SET="mmap-experts=off cpu-threads=48 ssd-cache=0 dspark=on experts=5"`. The strata-dsv41 command line now has `--mmap-experts off`, and the engine copied 15,203 of the CPU lane's 15,342 experts into RAM. With `mmap-experts=on` it gets `--mmap-experts on`, so the word comes through in both cases. I ran it twice in the same container with the same prompts, changing only that flag (greedy, thinking off, 400 tokens out, two rounds). Decode in tokens per second: | | code | explain | story | 19.6K prompt read | |---|---|---|---|---| | `mmap-experts=on` (in place) | 20.6 / 21.9 | 18.4 / 18.9 | 17.1 / 16.9 | 726 | | `mmap-experts=off` | 32.5 / 34.7 | 29.7 / 29.1 | 26.9 / 26.7 | 730 | That's about +58% decode, in line with what I measured in the report. Prompt reading is the same either way.
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#2326
No description provided.