Repository navigation
Flash-Next MTP: draft from part of the vocabulary - #269
Conversation
…cab.py) Qwen3.8-Flash-Next's MTP head computes logits over all 248,320 tokens per drafted token, which is the model's 644 MiB Q8_0 output matrix read three times per decode step. The draft only proposes and the model checks every token, so the head can be cut to the tokens it is likely to propose. - tools/mtp_draft_vocab.py writes such a head from Unsloth's shared MTP head and the target's output rows: blk.<L>.nextn.shared_head_head (K rows) + d2t (I64) + onebit.draft_vocab. - config/draft-vocab/qwen38-en-code-65536.txt is dime-online's 65,536-id English + code list (qwen3.8-Flash-DGX-UltraFast, Apache-2.0), credited in NOTICE with its own notice text; exempt from our header in tools/copyright.py, since it is their work. - third_party/llama.cpp-vulkan cecf3ee -> fd16437 (fork #56): the qwen4exp MTP graph runs the K-row head and scatters its logits back to the full vocabulary. - tests/mtp_draft_vocab_test.py (CI): rows, d2t and every other tensor and key checked on a made-up target and head; bad inputs refused. - docs/serve.md: usage and numbers; docs/vulkan.md: the carried commit. Strix Halo, Vulkan, UD-Q4_K_XL, greedy, draft length 3, rounds 2-3 of 3: code 47.8 -> 52.1 tok/s, prose 38.6 -> 42.2, 768-token code 45.8 -> 48.3, the same acceptance; French 46.4 -> 39.6 (its tokens are outside the list). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍(Review updated until commit c4e4581)Here are some key observations to aid the review process:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Re the PR-Agent notes on |
|
Persistent review updated to latest commit c4e4581 |
|
Blocking (PR-Agent duty): llama.cpp #56 merged without the d2t value check the review asked for. Please land that check in the fork, in our |
…bad d2t ids (llama.cpp #57) (#272) #269 pinned llama.cpp #56 (Flash-Next MTP drafting from part of the vocabulary) before its d2t ids were validated: set_rows scatters the draft logits to those ids, so an id outside the vocabulary or a repeated one could write outside the logits row. #57 reads the ids at load and refuses the file. Registry: pin line only (--check-pins ok). Co-authored-by: bong-water-water-bong <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…fixes engine #1417) (#1759) Moves third_party/llama.cpp 60ae4c9358 -> 831629fe9a. Two commits matter for #1417 and both are the ones this issue asked for: 58cadcf hrx: the LIVE pool check takes the host term too (engine #1502) <- fork #259 831629f hrx: print the two storages and the view's layout for a refused alias node With #259 the live check answers min(GTT free, MemAvailable) - the same two-term model the open-time budget has had since #256 - so the issue's reported shape is the case it now refuses: a 15.35 GiB request, a GTT counter showing room, ~15 GiB of host memory left. Before this, the live check used the GTT figure alone, which is exactly the over-promise #256 removed at open time. What #1417 has now, across the three bumps: #254 + 8f124f9 the live check is ON by default, margin 256 MiB, pool_live_fits pure, and a typo can no longer switch the guardrail off (bumped in #1736) #256 + #269 the pool budget is min(GTT term, host term), and the host-weight arena is charged to the pool before it grows #259 the live check reads the same two terms Verified: registry regenerated at the new pin (only the sources sha moves; counts stay 298/9/298/298), registry_build.py --check-pins passes, check_pins.py says '60ae4c935 -> 831629fe9 is ahead'. Not claimed by this bump, stated so a merged pin is not over-read: the allocator-side case (an allocation that fails although the live figures say it fits) is #1502's slab-provider class, and the fork's own review of #259 left one line open - a raw 0 from host_memory_available_bytes() is mapped to kHostUnknown by both callers, so a genuinely exhausted host reads as 'unreadable' and the term is dropped. That is the extreme case, and it is written in the #259 thread rather than fixed here. Co-authored-by: pi-hrx-sched <[email protected]>
Qwen3.8-Flash-Next's MTP head computes logits over all 248,320 tokens for every drafted token, which means reading the model's 644 MiB Q8_0 output matrix three times per decode step. The draft only proposes and the model checks every token, so the head can be cut down to the tokens it is likely to propose. Only the acceptance rate can change.
Idea and id list: dime-online/qwen3.8-Flash-DGX-UltraFast (vLLM on a DGX Spark, Apache-2.0); credited in NOTICE.
Changes
tools/mtp_draft_vocab.pywrites a reduced head. It takes Unsloth's shared MTP head plus the target's output rows for the listed ids, and adds:blk.<L>.nextn.shared_head_head(K rows)d2t(I64)onebit.draft_vocabconfig/draft-vocab/qwen38-en-code-65536.txtis dime-online's 65,536-id English + code list.tools/copyright.py, because it is their work.third_party/llama.cpp-vulkancecf3ee->fd16437: fork #56, theqwen4expMTP graph for such heads.tests/mtp_draft_vocab_test.py, in CI: on a made-up target and head, checks the head rows,d2t, and every other tensor and key. Bad inputs are refused.docs/serve.md(usage, numbers, caveats);docs/vulkan.md(the carried commit).Measured
Strix Halo, fork
llama-server(Vulkan). UD-Q4_K_XL, greedy, draft length 3. Decode tok/s, median of rounds 2-3 of 3.1bit serve. It passes--mtpthrough, but Flash-Next also needs-lm mmap, which serve does not set yet; measured with llama-server directly.🤖 Generated with Claude Code