File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments