server: can_speculate() requires a task instance

This commit is contained in:
Sascha Rogmann
2026-01-03 10:16:22 +01:00
parent f1f6584ce6
commit 907d094f9e
+2 -2
View File
@@ -1180,6 +1180,8 @@ private:
slot.smpl.reset();
}
slot.task = std::make_unique<const server_task>(std::move(task));
// initialize draft batch
// TODO: rework speculative decoding [TAG_SERVER_SPEC_REWORK]
if (slot.can_speculate()) {
@@ -1188,8 +1190,6 @@ private:
slot.batch_spec = llama_batch_init(task.params.speculative.n_max + 1, 0, 1);
}
slot.task = std::make_unique<const server_task>(std::move(task));
slot.state = slot.task->is_child()
? SLOT_STATE_WAIT_OTHER // wait for the parent to process prompt
: SLOT_STATE_STARTED;