make : build fixes
Some checks failed
flake8 Lint / Lint (push) Has been cancelled

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

View File

@ -966,6 +966,7 @@ OBJ_COMMON = \
$(DIR_COMMON)/console.o \ $(DIR_COMMON)/console.o \
$(DIR_COMMON)/ngram-cache.o \ $(DIR_COMMON)/ngram-cache.o \
$(DIR_COMMON)/sampling.o \ $(DIR_COMMON)/sampling.o \
$(DIR_COMMON)/speculative.o \
$(DIR_COMMON)/build-info.o \ $(DIR_COMMON)/build-info.o \
$(DIR_COMMON)/json-schema-to-grammar.o $(DIR_COMMON)/json-schema-to-grammar.o

View File

@ -150,7 +150,7 @@ llama_tokens common_speculative_gen_draft(
cur++; cur++;
} }
if ((cur >= params.n_reuse || prompt_tgt.size() <= n_ctx) && cur > reuse_n) { if ((cur >= params.n_reuse || n_ctx >= (int) prompt_tgt.size()) && cur > reuse_n) {
reuse_i = i; reuse_i = i;
reuse_n = cur; reuse_n = cur;
} }
@ -229,7 +229,7 @@ llama_tokens common_speculative_gen_draft(
result.push_back(id); result.push_back(id);
if (result.size() >= params.n_draft) { if (params.n_draft <= (int) result.size()) {
break; break;
} }