Skip to content

Commit 90ab8a1

Browse files
committed
speculative : limit batch size to llama_n_batch
1 parent 67d1849 commit 90ab8a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/speculative/speculative.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ int main(int argc, char ** argv) {
195195
drafts[s].smpl = common_sampler_init(model_dft, params.sparams);
196196
}
197197

198-
llama_batch batch_dft = llama_batch_init(llama_n_ctx(ctx_dft), 0, 1);
199-
llama_batch batch_tgt = llama_batch_init(llama_n_ctx(ctx_tgt), 0, n_seq_dft);
198+
llama_batch batch_dft = llama_batch_init(llama_n_batch(ctx_dft), 0, 1);
199+
llama_batch batch_tgt = llama_batch_init(llama_n_batch(ctx_tgt), 0, n_seq_dft);
200200

201201
const auto t_dec_start = ggml_time_us();
202202

0 commit comments

Comments
 (0)