mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-28 04:14:35 +00:00
This commit is contained in:
parent
ccc8f63f9f
commit
2e197a1f21
1
Makefile
1
Makefile
@ -966,6 +966,7 @@ OBJ_COMMON = \
|
||||
$(DIR_COMMON)/console.o \
|
||||
$(DIR_COMMON)/ngram-cache.o \
|
||||
$(DIR_COMMON)/sampling.o \
|
||||
$(DIR_COMMON)/speculative.o \
|
||||
$(DIR_COMMON)/build-info.o \
|
||||
$(DIR_COMMON)/json-schema-to-grammar.o
|
||||
|
||||
|
@ -150,7 +150,7 @@ llama_tokens common_speculative_gen_draft(
|
||||
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_n = cur;
|
||||
}
|
||||
@ -229,7 +229,7 @@ llama_tokens common_speculative_gen_draft(
|
||||
|
||||
result.push_back(id);
|
||||
|
||||
if (result.size() >= params.n_draft) {
|
||||
if (params.n_draft <= (int) result.size()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user