Skip to content

common: fix draft-mtp with embeddings (#26352, #27299) - #27400

Merged
CISC merged 2 commits into
ggml-org:masterfrom
aorko01:issue
Aug 22, 2026
Merged

CISC merged 2 commits into
ggml-org:masterfrom
aorko01:issue

Conversation

@aorko01

@aorko01 aorko01 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Overview

Fixes an issue where embedding and pooling_type settings from the main context were incorrectly inherited by the MTP context. The patch disables embeddings and pooling for the speculative context.

Additional information

The MTP context is used as a decoder/token-prediction context and should not produce embeddings, so embedding should be set to false. This prevents build_pooling() from being called with a null tensor and explicitly decouples the draft context's embedding/pooling settings from those requested for the main model.

Requirements

@aorko01
aorko01 requested a review from a team as a code owner August 19, 2026 17:52
@aorko01

aorko01 commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @CISC , would you have a look at the PR?
I tested the patch on the Qwen 3.8-27B model and tested the two attached issues.
I think you reviewed my last PR. So mentioning you.
Please review it and ask if there is any query on your convenient time.

@aorko01

aorko01 commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @CISC ,I looked into the failed tests. I think the WGSL error is unrealated to this patch.
May be the source of this failure is this PR #26134.
I think it is merge ready. Please have a look .

@CISC
CISC merged commit 2c6b141 into ggml-org:master Aug 22, 2026
24 of 26 checks passed
therealkenc pushed a commit to therealkenc/llama.cpp that referenced this pull request Aug 24, 2026
… (ggml-org#27400)

* common: fix draft-mtp with embeddings (ggml-org#26352)

* --whitespace

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
… (ggml-org#27400)

* common: fix draft-mtp with embeddings (ggml-org#26352)

* --whitespace

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
… (ggml-org#27400)

* common: fix draft-mtp with embeddings (ggml-org#26352)

* --whitespace

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants