mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
eagle3: support --eagle3 in llama-cli
This commit is contained in:
+1
-1
@@ -3352,7 +3352,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
|
||||
[](common_params & params) {
|
||||
params.speculative.eagle3 = true;
|
||||
}
|
||||
).set_examples({LLAMA_EXAMPLE_SPECULATIVE}));
|
||||
).set_examples({LLAMA_EXAMPLE_SPECULATIVE, LLAMA_EXAMPLE_CLI}));
|
||||
add_opt(common_arg(
|
||||
{"-cd", "--ctx-size-draft"}, "N",
|
||||
string_format("size of the prompt context for the draft model (default: %d, 0 = loaded from model)", params.speculative.n_ctx),
|
||||
|
||||
@@ -671,7 +671,18 @@ private:
|
||||
}
|
||||
|
||||
params_base.speculative.model_dft = model_dft.get();
|
||||
params_base.speculative.model_tgt = model;
|
||||
params_base.speculative.cparams_dft = common_context_params_to_llama(params_dft);
|
||||
|
||||
if (params_base.speculative.eagle3) {
|
||||
// EAGLE3 current limitation: extracted target features are per-context; multiple slots would overwrite each other
|
||||
if (params_base.n_parallel > 1) {
|
||||
SRV_ERR("%s", "EAGLE3 speculative decoding is not supported with n_parallel > 1\n");
|
||||
return false;
|
||||
}
|
||||
llama_set_eagle3(ctx, model_dft.get());
|
||||
SRV_INF("%s", "EAGLE3 feature extraction enabled on target model\n");
|
||||
}
|
||||
}
|
||||
|
||||
std::string & mmproj_path = params_base.mmproj.path;
|
||||
|
||||
Reference in New Issue
Block a user