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 = \
966
966
$(DIR_COMMON ) /console.o \
967
967
$(DIR_COMMON ) /ngram-cache.o \
968
968
$(DIR_COMMON ) /sampling.o \
969
+ $(DIR_COMMON ) /speculative.o \
969
970
$(DIR_COMMON ) /build-info.o \
970
971
$(DIR_COMMON ) /json-schema-to-grammar.o
971
972
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ llama_tokens common_speculative_gen_draft(
150
150
cur++;
151
151
}
152
152
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) {
154
154
reuse_i = i;
155
155
reuse_n = cur;
156
156
}
@@ -229,7 +229,7 @@ llama_tokens common_speculative_gen_draft(
229
229
230
230
result.push_back (id);
231
231
232
- if (result. size () >= params. n_draft ) {
232
+ if (params. n_draft <= ( int ) result. size () ) {
233
233
break ;
234
234
}
235
235
You can’t perform that action at this time.
0 commit comments