Skip to content

Commit a7e8bc1

Browse files
committed
server: can_speculate() requires a task instance
1 parent 3571fe2 commit a7e8bc1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/server/server-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,8 @@ struct server_context_impl {
11771177
slot.smpl.reset();
11781178
}
11791179

1180+
slot.task = std::make_unique<const server_task>(std::move(task));
1181+
11801182
// initialize draft batch
11811183
// TODO: rework speculative decoding [TAG_SERVER_SPEC_REWORK]
11821184
if (slot.can_speculate()) {
@@ -1185,8 +1187,6 @@ struct server_context_impl {
11851187
slot.batch_spec = llama_batch_init(task.params.speculative.n_max + 1, 0, 1);
11861188
}
11871189

1188-
slot.task = std::make_unique<const server_task>(std::move(task));
1189-
11901190
slot.state = slot.task->is_child()
11911191
? SLOT_STATE_WAIT_OTHER // wait for the parent to process prompt
11921192
: SLOT_STATE_STARTED;

0 commit comments

Comments
 (0)