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

オープン 初心者向け
#7,970 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp, python
領域
backend, cli

調査の方向性

strata_control/drafting.py の apply() から始めて、strip_mtp_flags() を呼び出す分岐を追います。issue では、通知なしに削除する両方の経路と既存の Decision.note メカニズムが特定されています。.strata ルートのメッセージパターンを読み、次に drafting の判定に関する該当テストを確認します。これらの分岐が drafter のフラグを削除したことを報告し、その通知をテストで確認できれば完了です。payload ではテストファイルは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C++
スター
11.6k
フォーク
1k
平均マージ
4日 17時間
マージ済み PR(30日)
28

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。