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

Đang mở Phù hợp với người mới
#7,970 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, python
Lĩnh vực
backend, cli

Hướng nghiên cứu

Bắt đầu tại strata_control/drafting.py, ở apply(), rồi lần theo các nhánh gọi strip_mtp_flags(); issue xác định cả hai đường dẫn âm thầm loại bỏ flags lẫn cơ chế Decision.note hiện có. Đọc mẫu thông báo của route .strata, sau đó kiểm tra các bài kiểm thử liên quan đến quyết định drafting. Hoàn thành khi các nhánh này thông báo rằng flags của drafter đã bị loại bỏ và có một bài kiểm thử bao quát ghi chú; payload không nêu tên tệp kiểm thử.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
11.6k
Fork
1k
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Niko1221/Strata

Tất cả issue của Niko1221/Strata

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.