Repository navigation
Fix Studio preferring MTP sidecars over embedded heads - #10181
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56f8c9b373
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| variant_mtp_expected = ( | ||
| None | ||
| if any(has_embedded_mtp_name_hint(file.path) for file in kept_main) | ||
| else mtp_expected |
There was a problem hiding this comment.
Keep the MTP sidecar until header metadata is available
When a headless GGUF happens to contain an MTP token adjacent to its quant, this filename-only hint removes the drafter from the variant's download plan even though no header has been inspected. If the user downloads the variant for later offline use, launch-time metadata can determine that nextn_predict_layers is zero or absent, but _download_mtp then has no cached sidecar to recover and speculative decoding is disabled. Keep the companion in the plan unless embedded-head metadata has actually been verified, or otherwise provide an offline-safe way to fetch it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ad61f96. The Hub planner no longer treats an MTP filename token as authoritative: it keeps the root companion until the downloaded main GGUF can be inspected, while launch-time positive nextn_predict_layers metadata still suppresses --model-draft. Added an offline-safety regression. Verification: 699 affected tests passed; focused pre-commit hooks passed; hermetic issue probe still emits embedded draft-mtp with no model drafter.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Confirmed the path in studio/backend/core/inference/llama_cpp.py where an embedded nextn_predict_layers head still gets a root mtp-*.gguf handed to --model-draft, and the Hub planner keeping the sidecar until the header is readable looks like the right split. Will get this reviewed. |
|
Follow-up: I ran the issue-specific live test on exact head
This closes the remaining gap between launch-construction coverage and real model inference for #10169. |
Summary
nextn_predict_layersvalue as authoritative proof that the selected GGUF embeds its MTP headWhy
Some repositories publish both a main GGUF with an embedded NextN/MTP head and a root
mtp-*.ggufcompatibility artifact. Studio currently passes that artifact as--model-draft; llama.cpp then replaces the embedded head and can reject the load, silently disabling speculative decoding.This keeps the behavior automatic and metadata-driven. Raw user-owned llama.cpp arguments and DSpark/DFlash modes remain unchanged.
Verification
ad61f96c3a0e9456c99daaa027ab7379903f6043: targeted suites passed on Ubuntu (699), macOS (699), and Windows (666 passed, 33 OS-specific skips)draft-mtpremains enabled and--model-draftis absentqwen35.nextn_predict_layers = 1RVN-Q6_K-mtp.gguf, 20.99 GiB) with the 1.69 GiBmtp-RVN.ggufsidecar present: Playwright loaded the model and completed a real chat; llama-server launched with--spec-type draft-mtp --spec-draft-n-max 2and no--model-draft; runtime metrics recorded 36 drafted / 35 accepted tokens across 18 speculative verification stepsCI note
Backend CI has two pre-existing merge-base failures:
test_non_gguf_reload_settings.py::TestNonGgufStatusReportsWhatTheLoadAskedFor; this PR changes neither that test norroutes/inference.py.test_model_picker_contracts.py::test_a_pinned_cached_row_loads_from_the_id_the_backend_pinned; this PR changes neither that test nor the frontend.Closes #10169