server: can_speculate() tests self-spec
This commit is contained in:
parent
5108add5cb
commit
9fee55e2d5
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue