#6203 [Engine] serve/server.py engine_args() ignores hand edits to args without user_args

closed · @midhatn · 1 评论 · 去 GitHub 看

Setup & installServer & APINVIDIA / CUDAModels & quantsDocumentation

说明

### Area

[Engine]  (speed, kernels, models, the server and API)

### Desktop app, Terminal or source?

Terminal (the `strata` command)

### What happened

`strata_control/user_args.py` and `docs/TERMINAL_LAUNCH.md` state that edits made by hand to `"args"` (any flag/value differing from `"args_written"`) count as persisted user overrides alongside `"user_args"`:

> *"Persisted overrides: the options you set by hand: `user_args` in the model's run config and changes you made to `args` in the launch's file since it was written."* (`docs/TERMINAL_LAUNCH.md`)

`setup.py`, `strata_control/arg_layers.py`, `strata_control/tune_apply.py`, `serve/runconfig.py`, and `apps/host/server/native-control.mjs` all call `user_args.capture(cfg)` so hand-edits in `"args"` vs `"args_written"` are preserved.

However, `serve/server.py` `engine_args()` merges only `cfg.get("user_args")` without calling `user_args.capture(cfg)` first, and `strata_control/drafting.py` `apply()` reads only `cfg.get("user_args") or []` for `--spec` and `--draft-conf`.

As a result, when invoking `strata serve --profile <config.json>` directly after editing `--spec` or `--draft-conf` by hand inside `"args"` (leaving `"args_written"` unchanged, and without placing them in `"user_args"`), `drafting.apply()` silently strips and resets `--spec` and `--draft-conf` to the backend policy defaults (for example `--spec 6 --draft-conf 0.35` on CUDA V100) instead of honoring the hand-edited `"args"`.

### Smallest steps or command that reproduce it

1. Start with a DFlash2 model profile JSON containing `"args_written"` from `setup` / `0.1.61`.
2. Put `"--spec", "8", "--draft-conf", "0.30"` inside `"args"` without placing them in `"user_args"` (because `engine_args()` never calls `user_args.capture(cfg)`, it ignores any `"args"` vs `"args_written"` difference as well).
3. Run `strata serve --profile /path/to/profile.json --port 8081`.
4. Check the `[strata] ... engine started:` line in the engine log: it receives `--spec 6 --draft-conf 0.35` instead of `--spec 8 --draft-conf 0.30` (whereas putting `["--spec", "8", "--draft-conf", "0.30"]` in `"user_args"` passes `--spec 8 --draft-conf 0.30` to the engine).

**Expected:** Either `engine_args()` runs `user_args.capture(cfg)` so hand-edits in `"args"` vs `"args_written"` work consistently across `strata serve --profile` as well as `strata launch`/`setup`, or `drafting.py` / `TERMINAL_LAUNCH.md` documents that direct `strata serve --profile` configs must place `--spec` / `--draft-conf` in `"user_args"`.

### Reproduction status

Reproduced locally

### Strata version

Strata 0.2.15 · control 0.1.61 · engine 0.1.60 / 0.1.61

### Graphics card, memory and system

2 x NVIDIA Tesla V100-SXM2-16GB · 121.5 GiB RAM · Ubuntu 26.04.1 LTS

### Model, size and settings

Qwen3.8-Flash-Next UD-IQ2_XS + DFlash2 · 64K / 128K / 256K context · pictures on

本站相关内容

相关页面的快捷入口。