[GH-ISSUE #5348] [Other] Docker: no DRAFTING variable, so a container cannot pin the drafter without a shell #3188

Open
opened 2026-11-07 14:38:45 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @simlu on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5348

Area

[Other] (anything else, including setup and installation)

What do you want to do?

We want to pin the drafter (MTP vs DFlash2) declaratively from the container environment — a DRAFTING variable, exactly what PR https://github.com/Niko1221/Strata/pull/5116 implements. We are asking for scope agreement on that PR, not proposing a different change.

Problem. The Docker entry point has a variable for every strata launch screen except Drafting. Confirmed on the 0.2.11 sources: entrypoint.sh rebuilds the launch argv from known env only (extra compose command: args are dropped entirely), STRATA_SET forwards to --set, which is for engine knobs and not launcher settings (unknown names get a warning), and strata_control/drafting.py reads no env. Today the only path is a shell inside the container.

Who needs it and why. We serve a kiosk from ghcr.io/niko1221/strata:0.2.11-cuda13 (Terminal/Control 0.1.57), Ubuntu 24.04, 4x RTX 3090 (compute cap 8.6) layer split, 256 GB RAM, Qwen3.8-Flash-Next Q8_0 (unsloth family), CONTEXT=262144, KV=fp16, PARALLEL=1, STRATA_DEFAULTS=026, PRESET=qwen-flash — thinking-heavy agent decode, thousands of thinking tokens per turn. Auto arms DFlash2 on cc 8.6 at PARALLEL=1, but the DFlash2-over-MTP gain lives in short-answer regimes: the 0.2.10 notes put it at about zero on long agent sessions and +1.38% on 2K-token answers, and acceptance is pack-dependent (0.2.11 documents 0% acceptance on Arc with UD-IQ1_M; nothing published for a Q8_0 pack). #5153's DFlash2-only snapshot failure ("invalid K/V extent" forcing a re-prefill) is a second reason a kiosk wants the explicit choice over Auto.

Measured on this box (update after posting). We ran a controlled paired A/B — fixed 5-request prompt ladder, temperature 0, one arm per drafter, the box otherwise quiet — and MTP won every sustained-decode pair:

request DFlash2 MTP delta
4,000-tok run (repeat 1) 82.5 t/s 84.0 t/s +1.8%
4,000-tok run (repeat 2) 82.3 t/s 83.6 t/s +1.6%
~10.5K-tok run 86.4 t/s 87.6 t/s +1.4%
deep-thinking segment medians 78.8 79.7 ~+1%
short requests (~80–100 tok) — — wash

Within-arm repeat agreement was ±0.24% (DFlash2) / ±0.5% (MTP), and prompt-cache hit and PCIe overhead matched between arms (≈98%, +0.8%), so the delta clears our noise floor. It is launch-level observation, not benchmark-protocol quality — but it makes the drafter a setting worth pinning on exactly the long-agent-session workload the 0.2.10 notes call out.

Proposed behavior (PR #5116's, unchanged). DRAFTING (auto|mtp|dflash2|off), lower-cased and validated — a typo stops the start with exit code 2 instead of silently falling back to Auto; unset/empty leaves today's launch argv unchanged; passed to launch --drafting and saved in the preset like KV/VISION. Once the choice reaches the launcher, everything stays as it is — the launcher still decides, falls back, and says why. Tradeoff: one row in the settings table; no new engine behavior; containers that do not set DRAFTING are unaffected.

Where we landed (update). To get a declarative pin without the variable, our compose service's command: wrapper rewrites the run config's drafting key (/data/install/strata-unsloth-*.json) before invoking entrypoint.sh. It works — verified across restarts and recreates — because the launcher treats run-config hand edits as persisted overrides ("calibrated values and hand edits are kept") and serve applies them at every model start. That confirms the flag's destination is honored; only the env-to-argv leg is missing. But the emulation hangs off internal file naming and hand-edit persistence semantics that nothing designates as an interface — a launcher refactor could silently stop honoring the pin, with no error and Auto's drafter serving production. That fragility is precisely what a first-class DRAFTING row removes.

Status of the claims. The env-absence findings were reproduced locally on the environment above and checked against the v0.2.11 sources; the drafter A/B is our own paired ladder, below benchmark-protocol quality; the wrapper workaround is in production on this box.

What do you do today instead?

Previously: docker exec <container> strata launch --drafting mtp --preset qwen-flash once after the model exists — the choice persists in the volume's run config and entrypoint restarts fall back to it. Costs: the compose file no longer states which drafter serves (the declarative state lies), the out-of-band engine restart needs orchestration care, and a fresh volume silently serves Auto's DFlash2 until someone remembers the step. We have since moved to the compose command: wrapper emulation described above, which fixes the fresh-volume gap but adds a fourth cost: the pin now depends on undocumented run-config internals, and live docker exec toggles are silently reverted by the wrapper on the next start — surprising exactly when you are A/B-testing drafters. A first-class DRAFTING variable removes all four.

Originally created by @simlu on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5348 ### Area [Other] (anything else, including setup and installation) ### What do you want to do? We want to pin the drafter (MTP vs DFlash2) declaratively from the container environment — a `DRAFTING` variable, exactly what PR https://github.com/Niko1221/Strata/pull/5116 implements. We are asking for scope agreement on that PR, not proposing a different change. **Problem.** The Docker entry point has a variable for every `strata launch` screen except Drafting. Confirmed on the 0.2.11 sources: `entrypoint.sh` rebuilds the launch argv from known env only (extra compose `command:` args are dropped entirely), `STRATA_SET` forwards to `--set`, which is for engine knobs and not launcher settings (unknown names get a warning), and `strata_control/drafting.py` reads no env. Today the only path is a shell inside the container. **Who needs it and why.** We serve a kiosk from `ghcr.io/niko1221/strata:0.2.11-cuda13` (Terminal/Control 0.1.57), Ubuntu 24.04, 4x RTX 3090 (compute cap 8.6) layer split, 256 GB RAM, Qwen3.8-Flash-Next Q8_0 (unsloth family), `CONTEXT=262144`, `KV=fp16`, `PARALLEL=1`, `STRATA_DEFAULTS=026`, `PRESET=qwen-flash` — thinking-heavy agent decode, thousands of thinking tokens per turn. Auto arms DFlash2 on cc 8.6 at PARALLEL=1, but the DFlash2-over-MTP gain lives in short-answer regimes: the 0.2.10 notes put it at about zero on long agent sessions and +1.38% on 2K-token answers, and acceptance is pack-dependent (0.2.11 documents 0% acceptance on Arc with UD-IQ1_M; nothing published for a Q8_0 pack). #5153's DFlash2-only snapshot failure ("invalid K/V extent" forcing a re-prefill) is a second reason a kiosk wants the explicit choice over Auto. **Measured on this box (update after posting).** We ran a controlled paired A/B — fixed 5-request prompt ladder, temperature 0, one arm per drafter, the box otherwise quiet — and MTP won every sustained-decode pair: | request | DFlash2 | MTP | delta | |---|---|---|---| | 4,000-tok run (repeat 1) | 82.5 t/s | 84.0 t/s | +1.8% | | 4,000-tok run (repeat 2) | 82.3 t/s | 83.6 t/s | +1.6% | | ~10.5K-tok run | 86.4 t/s | 87.6 t/s | +1.4% | | deep-thinking segment medians | 78.8 | 79.7 | ~+1% | | short requests (~80–100 tok) | — | — | wash | Within-arm repeat agreement was ±0.24% (DFlash2) / ±0.5% (MTP), and prompt-cache hit and PCIe overhead matched between arms (≈98%, +0.8%), so the delta clears our noise floor. It is launch-level observation, not benchmark-protocol quality — but it makes the drafter a setting worth pinning on exactly the long-agent-session workload the 0.2.10 notes call out. **Proposed behavior** (PR #5116's, unchanged). `DRAFTING` (`auto|mtp|dflash2|off`), lower-cased and validated — a typo stops the start with exit code 2 instead of silently falling back to Auto; unset/empty leaves today's launch argv unchanged; passed to `launch --drafting` and saved in the preset like `KV`/`VISION`. Once the choice reaches the launcher, everything stays as it is — the launcher still decides, falls back, and says why. Tradeoff: one row in the settings table; no new engine behavior; containers that do not set DRAFTING are unaffected. **Where we landed (update).** To get a declarative pin without the variable, our compose service's `command:` wrapper rewrites the run config's `drafting` key (`/data/install/strata-unsloth-*.json`) before invoking `entrypoint.sh`. It works — verified across restarts and recreates — because the launcher treats run-config hand edits as persisted overrides ("calibrated values and hand edits are kept") and `serve` applies them at every model start. That confirms the flag's destination is honored; only the env-to-argv leg is missing. But the emulation hangs off internal file naming and hand-edit persistence semantics that nothing designates as an interface — a launcher refactor could silently stop honoring the pin, with no error and Auto's drafter serving production. That fragility is precisely what a first-class `DRAFTING` row removes. **Status of the claims.** The env-absence findings were reproduced locally on the environment above and checked against the v0.2.11 sources; the drafter A/B is our own paired ladder, below benchmark-protocol quality; the wrapper workaround is in production on this box. ### What do you do today instead? Previously: `docker exec <container> strata launch --drafting mtp --preset qwen-flash` once after the model exists — the choice persists in the volume's run config and entrypoint restarts fall back to it. Costs: the compose file no longer states which drafter serves (the declarative state lies), the out-of-band engine restart needs orchestration care, and a fresh volume silently serves Auto's DFlash2 until someone remembers the step. We have since moved to the compose `command:` wrapper emulation described above, which fixes the fresh-volume gap but adds a fourth cost: the pin now depends on undocumented run-config internals, and live `docker exec` toggles are silently reverted by the wrapper on the next start — surprising exactly when you are A/B-testing drafters. A first-class `DRAFTING` variable removes all four.
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#3188
No description provided.