Skip to content

Commit f2299fa

Browse files
committed
server: can_speculate() tests self-spec
1 parent 0b60ba6 commit f2299fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/server/server-context.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ struct server_slot {
251251
return state != SLOT_STATE_IDLE;
252252
}
253253

254+
// Checks if a draft model is active or self-speculation using context-tokens
254255
bool can_speculate() const {
255-
return ctx_dft;
256+
return ctx_dft || task->params.speculative.use_self;
256257
}
257258

258259
void add_token(const completion_token_output & token) {
@@ -264,7 +265,7 @@ struct server_slot {
264265
}
265266

266267
int get_n_draft_max() const {
267-
if (!can_speculate() && !task->params.speculative.use_self) {
268+
if (!can_speculate()) {
268269
return 0;
269270
}
270271

0 commit comments

Comments
 (0)