server: introduce self-speculative decoding

This commit is contained in:
Sascha Rogmann
2025-12-29 20:46:32 +01:00
parent 8f91ca54ec
commit 1fb2658b0d
6 changed files with 105 additions and 11 deletions
+7
View File
@@ -3392,6 +3392,13 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
params.speculative.replacements.push_back({ tgt, dft });
}
).set_examples({LLAMA_EXAMPLE_SPECULATIVE, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_CLI}));
add_opt(common_arg(
{"--spec-self"}, "<0|1>",
"use self-speculation without a draft model (default: 0, no self speculation without draft model)",
[](common_params & params, int value) {
params.speculative.use_self = value;
}
).set_examples({LLAMA_EXAMPLE_SERVER}));
add_opt(common_arg(
{"-ctkd", "--cache-type-k-draft"}, "TYPE",
string_format(