[PR #1268] [CLOSED] --batch-mtp: the first slot admission ends the engine ("unsupported native MMVQ GGML type") #3347

Closed
opened 2026-11-07 14:40:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1268
Author: @crazyaimachine
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: batch-mtp-shared-head


📝 Commits (1)

  • d3102f7 mtp: a drafter sharing another's weights takes its draft head type (--batch-mtp crashed)

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 src/core/mtp.cpp (+6 -1)

📄 Description

Problem. With --batch-mtp, the engine exits at the first request that goes into a batch slot:

strata batch: MTP admission for slot 0 failed: mtp: unsupported native MMVQ GGML type

The slot drafters share the main drafter's weights and draft head (MtpDrafter::bind(..., shared)). bind() copies the draft head subset (dhead_, dvocab_, n_dvocab_) but not its ggml type. dhead_type_ stays -1, and native_mmvq refuses it. This hits every --batch-mtp run that has a draft vocabulary, which is the default.

Fix. One commit in src/core/mtp.cpp:

  • bind() with a shared drafter also copies dhead_type_.
  • load() with shared weights also takes the --mtp-q4 Q4_0 copies (dense4_, q4_off_, q4_, q4_head_). They would be missing in the same way.
  • dense4_ is freed only by the drafter that owns the weights.

Checked. Setup: 1× TITAN RTX (Turing), UD-Q4_K_XL with the BF16 PLE table, --batch 4 --batch-mtp --spec 4, MTP runtime with draft vocabulary.

  • Before the fix: the engine exits at the first BGEN.
  • After the fix: tools/batch_test.py --batch 4 --n 4 --max-new 96 --mt-min 1 --extra "--batch-mtp --pcie-frac 0 --adapt-every 1000000" reports all 4 slots IDENTICAL to their solo tokens.

Side note from the same machine: I also tried --batch-mtp on a 2-GPU layer split, without --batch-groups. It works and gives tokens identical to solo, but it needs two more changes, and on Turing it was slower than the pipelined batch without MTP. So it is not part of this PR. I can open it separately if it is of interest.

Written by my agent, tested on my machine.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1268 **Author:** [@crazyaimachine](https://github.com/crazyaimachine) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `batch-mtp-shared-head` --- ### 📝 Commits (1) - [`d3102f7`](https://github.com/Niko1221/Strata/commit/d3102f7a1f84b2c2cd019f7624a44e15812b30bc) mtp: a drafter sharing another's weights takes its draft head type (--batch-mtp crashed) ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/core/mtp.cpp` (+6 -1) </details> ### 📄 Description **Problem.** With `--batch-mtp`, the engine exits at the first request that goes into a batch slot: ``` strata batch: MTP admission for slot 0 failed: mtp: unsupported native MMVQ GGML type ``` The slot drafters share the main drafter's weights and draft head (`MtpDrafter::bind(..., shared)`). `bind()` copies the draft head subset (`dhead_`, `dvocab_`, `n_dvocab_`) but not its ggml type. `dhead_type_` stays -1, and `native_mmvq` refuses it. This hits every `--batch-mtp` run that has a draft vocabulary, which is the default. **Fix.** One commit in `src/core/mtp.cpp`: - `bind()` with a shared drafter also copies `dhead_type_`. - `load()` with shared weights also takes the `--mtp-q4` Q4_0 copies (`dense4_`, `q4_off_`, `q4_`, `q4_head_`). They would be missing in the same way. - `dense4_` is freed only by the drafter that owns the weights. **Checked.** Setup: 1× TITAN RTX (Turing), UD-Q4_K_XL with the BF16 PLE table, `--batch 4 --batch-mtp --spec 4`, MTP runtime with draft vocabulary. - Before the fix: the engine exits at the first `BGEN`. - After the fix: `tools/batch_test.py --batch 4 --n 4 --max-new 96 --mt-min 1 --extra "--batch-mtp --pcie-frac 0 --adapt-every 1000000"` reports all 4 slots IDENTICAL to their solo tokens. Side note from the same machine: I also tried `--batch-mtp` on a 2-GPU layer split, without `--batch-groups`. It works and gives tokens identical to solo, but it needs two more changes, and on Turing it was slower than the pipelined batch without MTP. So it is not part of this PR. I can open it separately if it is of interest. Written by my agent, tested on my machine. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3347
No description provided.