server: can_speculate() tests self-spec

This commit is contained in:
Sascha Rogmann 2026-01-02 00:10:46 +01:00
parent 5108add5cb
commit 9fee55e2d5
1 changed files with 3 additions and 2 deletions

View File

@ -251,8 +251,9 @@ struct server_slot {
return state != SLOT_STATE_IDLE;
}
// Checks if a draft model is active or self-speculation using context-tokens
bool can_speculate() const {
return ctx_dft;
return ctx_dft || task->params.speculative.use_self;
}
void add_token(const completion_token_output & token) {
@ -264,7 +265,7 @@ struct server_slot {
}
int get_n_draft_max() const {
if (!can_speculate() && !task->params.speculative.use_self) {
if (!can_speculate()) {
return 0;
}