Add speculative decoding support to the server and command-line interfaces

This commit is contained in:
DeEMO
2025-06-30 09:35:35 +00:00
committed by DeEMO
parent 1ea2d61a97
commit 2e8e42a5ad
11 changed files with 591 additions and 31 deletions
+6
View File
@@ -20944,6 +20944,12 @@ struct llama_context * llama_new_context_with_model(
ctx->cparams.rank = params.rank;
ctx->cparams.force = params.force;
ctx->cparams.original_next_rank = (params.rank + 1) % params.n_world;
auto &hparams = model->hparams;
auto &cparams = ctx->cparams;
cparams.n_ctx = params.n_ctx == 0 ? hparams.n_ctx_train : params.n_ctx;
ctx->logits_all = params.logits_all;
return ctx;
}