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

Abierto Apto para principiantes
#7,970 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp, python
Área
backend, cli

Línea de trabajo

Empieza en strata_control/drafting.py, en apply(), y sigue las ramas que llaman a strip_mtp_flags(); el issue identifica tanto las rutas de eliminación silenciosa como el mecanismo Decision.note existente. Lee el patrón de mensajes de la ruta .strata y luego revisa las pruebas pertinentes para las decisiones de drafting. La tarea está completa cuando estas ramas informen de que se han eliminado flags del drafter y una prueba cubra la nota; el payload no indica ningún archivo de prueba.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Merge medio
4 d 17 h
PR fusionados (30 d)
28

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.