speculative : minor fixup

This commit is contained in:
Georgi Gerganov 2024-11-22 13:48:39 +02:00
parent f27ddc57d7
commit ccc8f63f9f
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 5 additions and 3 deletions

View File

@ -41,8 +41,9 @@ int main(int argc, char ** argv) {
// load the target model
common_init_result llama_init_tgt = common_init_from_params(params);
model_tgt = llama_init_tgt.model;
ctx_tgt = llama_init_tgt.context;
ctx_tgt = llama_init_tgt.context;
// load the draft model
params.model = params.model_draft;
@ -53,8 +54,9 @@ int main(int argc, char ** argv) {
params.cpuparams_batch.n_threads = params.draft_cpuparams_batch.n_threads;
common_init_result llama_init_dft = common_init_from_params(params);
model_dft = llama_init_dft.model;
ctx_dft = llama_init_dft.context;
ctx_dft = llama_init_dft.context;
if (!common_speculative_are_compatible(ctx_tgt, ctx_dft)) {
return 1;

View File

@ -70,7 +70,7 @@ int main(void) {
// non-existence arg in specific example (--draft cannot be used outside llama-speculative)
argv = {"binary_name", "--draft", "123"};
assert(false == common_params_parse(argv.size(), list_str_to_char(argv).data(), params, LLAMA_EXAMPLE_SERVER));
assert(false == common_params_parse(argv.size(), list_str_to_char(argv).data(), params, LLAMA_EXAMPLE_EMBEDDING));
printf("test-arg-parser: test valid usage\n\n");