can_speculate() includes self-speculation

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Sascha Rogmann 2026-01-02 00:17:53 +01:00 committed by Sascha Rogmann
parent cbb492a837
commit 5108add5cb
1 changed files with 1 additions and 1 deletions

View File

@ -1153,7 +1153,7 @@ private:
// initialize draft batch
// TODO: rework speculative decoding [TAG_SERVER_SPEC_REWORK]
if (slot.ctx_dft || task.params.speculative.use_self) {
if (can_speculate()) {
llama_batch_free(slot.batch_spec);
slot.batch_spec = llama_batch_init(task.params.speculative.n_max + 1, 0, 1);