fix: restore mtp/nextn spec-type names, --mtp-head, and live draft flags in docs/scripts#44
Merged
Conversation
Stabilization: Vulkan build fix, versioning, dev/staging pipeline
Promote dev: NVFP4 quantize target, linux-x64-cuda-13.3 build, GPU smoke CI, laguna test fix
The b10018 upstream sync replaced the fork's speculative CLI with the upstream framework: the Gemma MTP and Qwen NextN paths both became draft-mtp, and --mtp-head disappeared. The docs and helper scripts kept the old names, so every command from README/MTP.md/NEXTN.md failed with 'invalid argument' (#37) or 'unknown speculative type' (#34). - map 'mtp' and 'nextn' to COMMON_SPECULATIVE_TYPE_DRAFT_MTP (duplicates are safe: type selection collapses into a bitmask) - add --mtp-head as an alias of --spec-draft-model/-md
--draft-max/--draft-min are removed-arg stubs and --draft-block-size no longer exists; all examples now use --spec-draft-n-max/--spec-draft-n-min (per-round chain length N = old block size B - 1).
DRAFT_BLOCK_SIZE keeps working (translated to --spec-draft-n-max B-1); the legacy DRAFT_MAX cap is no longer forwarded for Gemma helpers, and the Qwen NextN helper defaults to the documented n-max 2 / n-min 1.
The b10018 sync renamed the assistant tensors to NEXTN_*/MASKED_EMBD_* (which have their own mapping entries) but left the old MTP_* references behind; since MODEL_TENSOR.MTP_PRE_PROJECTION no longer exists, importing gguf crashed with AttributeError — taking every conversion script down with it.
The published assistant GGUFs predate the sync: different arch name
('gemma4_assistant'), kv namespace, and a different head architecture at
the tensor level (single mtp.* projections vs per-block nextn.*), so
they cannot be loaded by the upstream gemma4-assistant support. Replace
'unknown model architecture' with an actionable message pointing at
re-download/reconversion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #34. Fixes the CLI half of #37 — see the caveat below for the rest.
The b10018 upstream sync replaced the fork's speculative CLI with the upstream framework. The Gemma MTP and Qwen NextN paths both live on as
draft-mtp, but the fork's spelling of the flags died while README/MTP.md/NEXTN.md and the helper scripts kept advertising them:--mtp-head→ invalid argument (Eval bug: #37)--spec-type mtp/--spec-type nextn→ unknown speculative type (Misc. bug: #34)--draft-max/--draft-min→ removed-arg stubs,--draft-block-size→ gone entirely (every doc example and all six run-*.sh helpers)Changes
mtpandnextnare accepted spec-type aliases fordraft-mtp(harmless duplicates — selection collapses into a bitmask);--mtp-headis an alias of--spec-draft-model/-md. Canonical names in--helpstay upstream.--spec-draft-n-max/--spec-draft-n-min; block-size prose annotated with theN = B - 1mapping.DRAFT_BLOCK_SIZEto--spec-draft-n-max B-1; Qwen NextN helper defaults to the documented2/1.AttributeError: MTP_PRE_PROJECTION(dead tensor-mapping entries left behind by the sync's NEXTN_/MASKED_EMBD_ rename) — every conversion script was broken. Entries dropped.unknown model architecture: 'gemma4_assistant'.End-to-end verification on the exact model pair from #37 (
gemma-4-E2B-it-UD-Q4_K_XL+AtomicChat/gemma-4-E2B-it-assistant.Q4_K_M) shows the published assistant heads predate the sync and are incompatible at three levels: arch name (gemma4_assistantvsgemma4-assistant), kv namespace (nextn_predict_layers,embedding_length_outmissing), and tensor layout (singlemtp.*projections vs per-blocknextn.*— a genuinely different head architecture). A compat shim in C++ is not possible; the files must be regenerated withconversion/gemma.py(which this PR un-breaks via the gguf-py fix) and re-published to the HF collections.Verification
test-arg-parser: all tests OK;import ggufworks again--spec-type nextnwithout-mdparses and takes the shared-model pathbash -nclean on all touched scripts