speculative : add infill mode

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-11-26 11:14:17 +02:00
parent 0eb4e12bee
commit b83cae088c
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
3 changed files with 26 additions and 22 deletions

View file

@ -2315,6 +2315,7 @@ struct server_context {
params_spec.n_draft = slot.params.speculative.n_max;
params_spec.n_reuse = llama_n_ctx(slot.ctx_dft) - slot.params.speculative.n_max;
params_spec.p_min = slot.params.speculative.p_min;
params_spec.infill = slot.inf_type == SERVER_TASK_INF_TYPE_INFILL;
llama_tokens draft = common_speculative_gen_draft(slot.spec, params_spec, slot.cache_tokens, id);