server: can_speculate() tests self-spec

This commit is contained in:
Sascha Rogmann
2026-01-02 00:10:46 +01:00
parent e3e809cc01
commit 38f7c28795
+3 -2
View File
@@ -258,8 +258,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) {
@@ -274,7 +275,7 @@ struct server_slot {
int get_n_draft_max() const {
GGML_ASSERT(task);
if (!can_speculate() && !task->params.speculative.use_self) {
if (!can_speculate()) {
return 0;
}