[GH-ISSUE #5178] [TUI] strata launch --set draft-conf=… is silently replaced by the DFlash2 auto value (only user_args survives) #3084

Closed
opened 2026-11-07 14:37:56 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @wangminle on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5178

Area

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

Desktop app, Terminal or source?

Terminal (the strata command)

What happened

strata launch --set draft-conf=0.35 does not reach the engine. The launch state file records the option in args:

"drafting": "dflash2",
"args": [..., "--kv-resident", "32768", "--draft-conf", "0.35"],
"args_written": [..., "--kv-resident", "32768"]

There is no user_args. At every start, serve/server.py calls strata_control.drafting.apply(). For DFlash2 it strips every --draft* flag from args and re-adds the drafter flags from drafting.engine_flags(). That function keeps --draft-conf only from user_args (mine = cfg.get("user_args") or [], then kept_conf = _flag_value(mine, "--draft-conf")); otherwise it calls conf_for(backend, slots_of(base, vram_mib)). On this machine that estimate is about 10k slots, which maps to 0.5, so the engine starts with --draft-conf 0.5.

Expected: the value given to --set reaches the engine, or the launch says it was ignored.
Actual: the engine command line contains --draft-conf 0.5 while the state file says 0.35.

Adding "user_args": ["--draft-conf", "0.35"] to the same state file and starting it makes the engine use 0.35, which confirms the code path.

This is a different flag and code path from #5027 (--set mmap-experts=off never reaches strata-dsv41), but it is the same user-visible class: a --set value that the engine does not receive.

Smallest steps or command that reproduce it

  1. Start the model with --set draft-conf=0.35 (full command below).
  2. Inspect the launch state file: args contains --draft-conf 0.35; user_args is absent.
  3. Inspect the engine process command line: it contains --draft-conf 0.5 instead.

Without a GPU or an engine start, using the installed control and the saved launch state:

import json, sys
sys.path.insert(0, "<control>/0.1.56")
from serve import server

cfg = json.load(open("<state>/launch/iq3_s-160k.json"))
args = server.engine_args(cfg, announce=False)
print(args[args.index("--draft-conf") + 1])   # 0.5

cfg["user_args"] = ["--draft-conf", "0.35"]
args = server.engine_args(cfg, announce=False)
print(args[args.index("--draft-conf") + 1])   # 0.35

The actual output from that run:

state args has --draft-conf: True 0.35
state user_args: None
engine_args --draft-conf: 0.5
with user_args --draft-conf: 0.35

A possible fix is for strata launch --set to write drafting flags into user_args, the existing channel for the person's own options, so drafting.apply keeps them. I have not changed any code.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.10 (build 0.1.56) · engine 0.1.56 (0.1.56-linux-x86_64-cuda-cuda13) · control 0.1.56

Graphics card, memory and system

RTX 4090 48 GB (49,140 MiB, sm_89) · 282.8 GiB RAM · Ubuntu 24.04.5 · driver 595.99.02 · CUDA 13

Model, size and settings

Qwen3.8-Flash-Next ISTA-DASLab GSQ-RCO IQ3_S · 160K context (163840) · KV int8 · DFlash2 · --kv-resident 32768

Launch command:

strata launch --model iq3_s --context 160k --vision off --parallel 1 \
  --drafting dflash2 --tune skip --access local --port 8080 \
  --set spec=6 --set spec-min-p=0.70 --set pcie-frac=0.35 \
  --set vram-reserve-mib=1024 --set prefill=auto:32768 --set STRATA_HC_Q8=1 \
  --set kv-resident=32768 --set draft-conf=0.35 --no-tui --yes

Logs

The relevant part of the launch state file after the start (paths shortened):

"drafting": "dflash2",
"args": [..., "--kv-resident", "32768", "--draft-conf", "0.35"],
"args_written": [..., "--kv-resident", "32768"]

args_written does not contain --draft-conf; user_args is absent. The engine command line read from /proc/<pid>/cmdline during that start contained --draft-conf 0.5.

Originally created by @wangminle on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5178 ### Area [TUI] (the Terminal: strata launch, connect, monitor) ### Desktop app, Terminal or source? Terminal (the `strata` command) ### What happened `strata launch --set draft-conf=0.35` does not reach the engine. The launch state file records the option in `args`: ```json "drafting": "dflash2", "args": [..., "--kv-resident", "32768", "--draft-conf", "0.35"], "args_written": [..., "--kv-resident", "32768"] ``` There is no `user_args`. At every start, `serve/server.py` calls `strata_control.drafting.apply()`. For DFlash2 it strips every `--draft*` flag from `args` and re-adds the drafter flags from `drafting.engine_flags()`. That function keeps `--draft-conf` only from `user_args` (`mine = cfg.get("user_args") or []`, then `kept_conf = _flag_value(mine, "--draft-conf")`); otherwise it calls `conf_for(backend, slots_of(base, vram_mib))`. On this machine that estimate is about 10k slots, which maps to 0.5, so the engine starts with `--draft-conf 0.5`. Expected: the value given to `--set` reaches the engine, or the launch says it was ignored. Actual: the engine command line contains `--draft-conf 0.5` while the state file says 0.35. Adding `"user_args": ["--draft-conf", "0.35"]` to the same state file and starting it makes the engine use 0.35, which confirms the code path. This is a different flag and code path from #5027 (`--set mmap-experts=off` never reaches strata-dsv41), but it is the same user-visible class: a `--set` value that the engine does not receive. ### Smallest steps or command that reproduce it 1. Start the model with `--set draft-conf=0.35` (full command below). 2. Inspect the launch state file: `args` contains `--draft-conf 0.35`; `user_args` is absent. 3. Inspect the engine process command line: it contains `--draft-conf 0.5` instead. Without a GPU or an engine start, using the installed control and the saved launch state: ```python import json, sys sys.path.insert(0, "<control>/0.1.56") from serve import server cfg = json.load(open("<state>/launch/iq3_s-160k.json")) args = server.engine_args(cfg, announce=False) print(args[args.index("--draft-conf") + 1]) # 0.5 cfg["user_args"] = ["--draft-conf", "0.35"] args = server.engine_args(cfg, announce=False) print(args[args.index("--draft-conf") + 1]) # 0.35 ``` The actual output from that run: ```text state args has --draft-conf: True 0.35 state user_args: None engine_args --draft-conf: 0.5 with user_args --draft-conf: 0.35 ``` A possible fix is for `strata launch --set` to write drafting flags into `user_args`, the existing channel for the person's own options, so `drafting.apply` keeps them. I have not changed any code. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.10 (build 0.1.56) · engine 0.1.56 (`0.1.56-linux-x86_64-cuda-cuda13`) · control 0.1.56 ### Graphics card, memory and system RTX 4090 48 GB (49,140 MiB, sm_89) · 282.8 GiB RAM · Ubuntu 24.04.5 · driver 595.99.02 · CUDA 13 ### Model, size and settings Qwen3.8-Flash-Next ISTA-DASLab GSQ-RCO IQ3_S · 160K context (163840) · KV int8 · DFlash2 · `--kv-resident 32768` Launch command: ```sh strata launch --model iq3_s --context 160k --vision off --parallel 1 \ --drafting dflash2 --tune skip --access local --port 8080 \ --set spec=6 --set spec-min-p=0.70 --set pcie-frac=0.35 \ --set vram-reserve-mib=1024 --set prefill=auto:32768 --set STRATA_HC_Q8=1 \ --set kv-resident=32768 --set draft-conf=0.35 --no-tui --yes ``` ### Logs The relevant part of the launch state file after the start (paths shortened): ```json "drafting": "dflash2", "args": [..., "--kv-resident", "32768", "--draft-conf", "0.35"], "args_written": [..., "--kv-resident", "32768"] ``` `args_written` does not contain `--draft-conf`; `user_args` is absent. The engine command line read from `/proc/<pid>/cmdline` during that start contained `--draft-conf 0.5`.
Author
Owner

@Have-Purple commented on GitHub (Nov 4, 2026):

Additional reproduction on 0.1.56, without --save-preset:

strata launch --plan --preset "IQ3_S 64K" --set spec=4 --no-tui
# plan shows: ... --set spec=4
strata launch --preset "IQ3_S 64K" --set spec=4 --restart --no-tui
# engine argv: --spec 6

The same happens with --set vram-reserve-mib=2048: the plan shows it, the engine keeps 700,
which is the value in the preset's user_args. The precedence is user_args > --set, but neither
the plan nor the launch output says so.

A related consequence: --save-preset "IQ3_S 64K DFlash2 spec4" saved successfully while the launch
ran --spec 6, so the preset name was the only record and it was wrong. Workaround used here: put
the flag in user_args (that survives), and read back the strata.exe command line before
benchmarking.

<!-- gh-comment-id:6635216865 --> @Have-Purple commented on GitHub (Nov 4, 2026): Additional reproduction on 0.1.56, without `--save-preset`: ``` strata launch --plan --preset "IQ3_S 64K" --set spec=4 --no-tui # plan shows: ... --set spec=4 strata launch --preset "IQ3_S 64K" --set spec=4 --restart --no-tui # engine argv: --spec 6 ``` The same happens with `--set vram-reserve-mib=2048`: the plan shows it, the engine keeps `700`, which is the value in the preset's `user_args`. The precedence is `user_args` > `--set`, but neither the plan nor the launch output says so. A related consequence: `--save-preset "IQ3_S 64K DFlash2 spec4"` saved successfully while the launch ran `--spec 6`, so the preset name was the only record and it was wrong. Workaround used here: put the flag in `user_args` (that survives), and read back the `strata.exe` command line before benchmarking.
Author
Owner

@tskorupka-emiteo commented on GitHub (Nov 5, 2026):

One more detail: user_args survives a server start, but not a strata launch.

Seen on Terminal 0.2.10 (engine 0.1.56, Linux HIP):

  1. I added "user_args": ["--draft-conf", "0.5", ...] and an "env" object by hand to .local/state/strata/launch/<profile>.json.
  2. I ran strata launch --family qwen --model iq3_xxs ... with the same choices.
  3. The file was rewritten with neither user_args nor env, and the engine started with --draft-conf 0.7.

The documented route (user_args, strata_control/user_args.py) therefore does not survive the Terminal's own relaunch, and --set draft-conf= is replaced as this issue describes. So from the Terminal there is no way to keep a hand-set --draft-conf.

What works today: start the supervisor directly against the saved config, python -m strata_control.runtime --host launch-<profile> (for example from a systemd unit). serve/server.py then merges user_args and applies env at every start, as intended.

<!-- gh-comment-id:6657049935 --> @tskorupka-emiteo commented on GitHub (Nov 5, 2026): One more detail: `user_args` survives a server start, but **not a `strata launch`**. Seen on Terminal 0.2.10 (engine 0.1.56, Linux HIP): 1. I added `"user_args": ["--draft-conf", "0.5", ...]` and an `"env"` object by hand to `.local/state/strata/launch/<profile>.json`. 2. I ran `strata launch --family qwen --model iq3_xxs ...` with the same choices. 3. The file was rewritten with neither `user_args` nor `env`, and the engine started with `--draft-conf 0.7`. The documented route (`user_args`, strata_control/user_args.py) therefore does not survive the Terminal's own relaunch, and `--set draft-conf=` is replaced as this issue describes. So from the Terminal there is no way to keep a hand-set `--draft-conf`. What works today: start the supervisor directly against the saved config, `python -m strata_control.runtime --host launch-<profile>` (for example from a systemd unit). `serve/server.py` then merges `user_args` and applies `env` at every start, as intended.
Author
Owner

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

Hello wangminle,

Thank you for the clear reproduction. In Strata 0.2.11 an explicit --set draft-conf=... is kept: explicit values now go through one precedence (explicit launch values, then saved overrides, then calibrated values, then Auto), and the DFlash2 policy and the server keep them. On the old code we saw your case exactly (saved 0.35, engine got 0.8). Note that --set X=off removes an option, and for options the DFlash2 policy owns (--draft-conf, --spec) the policy puts them back unless you use --drafting off. This is described in docs/TERMINAL_LAUNCH.md. If the engine still receives a different value on 0.2.11, please send the run config the launch wrote.

The Strata project

<!-- gh-comment-id:6658437359 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello wangminle, Thank you for the clear reproduction. In Strata 0.2.11 an explicit `--set draft-conf=...` is kept: explicit values now go through one precedence (explicit launch values, then saved overrides, then calibrated values, then Auto), and the DFlash2 policy and the server keep them. On the old code we saw your case exactly (saved 0.35, engine got 0.8). Note that `--set X=off` removes an option, and for options the DFlash2 policy owns (`--draft-conf`, `--spec`) the policy puts them back unless you use `--drafting off`. This is described in `docs/TERMINAL_LAUNCH.md`. If the engine still receives a different value on 0.2.11, please send the run config the launch wrote. The Strata project
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#3084
No description provided.