[Engine] serve drops --mtp/--spec-min-p from a run config's args with no warning: the MTP draft layer silently never loads

Aperta Adatta ai principianti
#7,970 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, python
Ambito
backend, cli

Direzione di ricerca

Inizia in strata_control/drafting.py, da apply(), e segui i rami che chiamano strip_mtp_flags(); l’issue identifica sia i percorsi di rimozione silenziosa sia il meccanismo Decision.note esistente. Leggi il modello di messaggio della route .strata, poi controlla i test pertinenti per le decisioni di drafting. Il lavoro è completato quando questi rami segnalano la rimozione dei flag del drafter e un test copre la nota; il payload non indica un file di test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

[Engine] — the drafting policy in strata_control/drafting.py (apply), as reached from the server's run-config → engine argument path.

Desktop app, Terminal or source?

Terminal (strata serve --profile ...).

What happened

The MTP draft-layer flags written directly into a run config's args array are silently dropped, and the model then runs without the draft layer while everything looks normal.

With this config (UD-IQ4_XS, Qwen4 GGUF route, single Intel Arc Pro B70):

"args": ["--pack", "...", "--native", "...", "--native-dense-gguf", "...", "--ple-gguf", "...",
         "--expert-profile", "...", "--expert-cache", "auto", "--prefill", "4096", "--max-context", "131072",
         "--kv", "fp16", "--vram-reserve-mib", "512",
         "--mtp", "<mtp-rt>", "--spec", "4", "--spec-min-p", "0.5",
         "--stream-experts"]

the engine's own log line shows what actually started:

engine started: .../strata --serve --pack ... --spec 4 --stream-experts          # --mtp and --spec-min-p: gone

The engine serves normally on prompt-lookup drafting only, and a standard-v1 benchmark against the no-drafting baseline comes back identical (81.0 / 82.2 / 81.2 vs 82.2 / 83.4 / 81.8 tok/s decode, short / 4K / 16K) — which is the dangerous part: nothing suggests the drafter is missing unless you read the engine's command line in its log.

Setting the same values through the config fields works — serve translates them itself:

"qwen4_mtp": "<mtp-rt>", "qwen4_mtp_mode": "auto", "qwen4_mtp_spec": 4
engine started: .../strata --serve --pack ... --mtp <mtp-rt> --spec 4 --spec-min-p 0.5 ...

and decode improves to 109.8-115.8 tok/s (+35-45% over no-drafting on this card, #7973).

The mechanism, verified in source: drafting.apply() takes the not-a-Flash-Next-name early return (supported_model is False for a Qwen4 model name), and because the config says "drafting": "off" it sets cfg["args"] = strip_mtp_flags(strip_draft_flags(args)) — MTP_ONLY_FLAGS takes --mtp and --spec-min-p out, --spec stays (it is not in the table). No note is set, so the caller prints nothing. The same silent strip is in the decision.drafter == "off" branch for supported models.

The design intent is documented — serve/qwen4_kind.py: "setup / the launcher keep the sidecar in the config key (not in 'args': Control would read --mtp as Flash-Next's draft layer)" — but the Terminal's own rule since #6203 is that options a person writes into args by hand count the same as the generated ones, so the drop deserves one line, not silence.

Smallest steps or command that reproduce it

Write --mtp <rt> --spec 4 --spec-min-p 0.5 into a Qwen4 GGUF-route run config's args (with "drafting": "off", as the launcher writes), start strata serve --profile <config>, and compare the engine's "engine started" log line with the config's args.

Reproduction status

Reproduced every time (identical on two starts of the args-array config; two starts of the fields config carry the flags).

Strata version

Strata 0.2.27, Control 0.1.74.2, engine strata-q4-lite-0.1.74-linux-x86_64-sycl.

Graphics card, memory and system

Intel Arc Pro B70 32 GB (BMG-G31, xe), AMD Ryzen 7 9700X, 32 GB RAM, Fedora 44, kernel 7.0.13-200.fc44.

Model, size and settings

Qwen4-35B-A3B UD-IQ4_XS through the GGUF route (trunk view + pack prepared locally), draft runtime built with the GGUF_MTP_CHAIN tools at q8_0.

Logs

The two "engine started" lines quoted above, from the engine's log. Suggested fix: set a Decision.note in the two strip branches when drafter flags were present in the arguments — the existing note machinery prints it (Drafting: off (...)) and leaves it for the next engine start, the same one-line pattern as the .strata route's "the engine does not take {...}, so they are left out of its start". Related: #7893 is the same class of "MTP silently absent, no log line" via a different mechanism (layer split); ours is single-GPU and purely config-side.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Merge medio
4g 17h
PR unite (30g)
28

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.