qwen35: use post-norm hidden state for MTP (#24025)

* qwen35: use post-norm hidden state for MTP

* rename pre_norm to nextn

* fix step35
This commit is contained in:
Aman Gupta
2026-06-04 01:29:09 +08:00
committed by GitHub
parent c8d6a00636
commit 166fe29492
12 changed files with 132 additions and 139 deletions

View File

@@ -259,9 +259,9 @@ struct server_slot {
return task->need_embd() || (spec && common_speculative_need_embd(spec));
}
bool need_embd_pre_norm() const {
bool need_embd_nextn() const {
GGML_ASSERT(task);
return spec && common_speculative_need_embd_pre_norm(spec);
return spec && common_speculative_need_embd_nextn(spec);
}
// if the context does not have a memory module then all embeddings have to be computed within a single ubatch
@@ -3013,7 +3013,7 @@ private:
// embedding requires all tokens in the batch to be output;
// MTP also wants logits at every prompt position so the
// streaming hook can mirror t_h_pre_norm into ctx_dft.
// streaming hook can mirror t_h_nextn into ctx_dft.
common_batch_add(batch,
cur_tok,
slot.prompt.tokens.pos_next(),