Skip to content

Commit 2e197a1

Browse files
committed
make : build fixes
1 parent ccc8f63 commit 2e197a1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ OBJ_COMMON = \
966966
$(DIR_COMMON)/console.o \
967967
$(DIR_COMMON)/ngram-cache.o \
968968
$(DIR_COMMON)/sampling.o \
969+
$(DIR_COMMON)/speculative.o \
969970
$(DIR_COMMON)/build-info.o \
970971
$(DIR_COMMON)/json-schema-to-grammar.o
971972

common/speculative.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ llama_tokens common_speculative_gen_draft(
150150
cur++;
151151
}
152152

153-
if ((cur >= params.n_reuse || prompt_tgt.size() <= n_ctx) && cur > reuse_n) {
153+
if ((cur >= params.n_reuse || n_ctx >= (int) prompt_tgt.size()) && cur > reuse_n) {
154154
reuse_i = i;
155155
reuse_n = cur;
156156
}
@@ -229,7 +229,7 @@ llama_tokens common_speculative_gen_draft(
229229

230230
result.push_back(id);
231231

232-
if (result.size() >= params.n_draft) {
232+
if (params.n_draft <= (int) result.size()) {
233233
break;
234234
}
235235

0 commit comments

Comments
 (0)