From 47bb241cb1b26e080193195dd665ad6ff520bcb8 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 20 Oct 2024 19:37:42 +0300 Subject: [PATCH] speculative : fix batch sizes at initialization ggml-ci --- examples/speculative/speculative.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/speculative/speculative.cpp b/examples/speculative/speculative.cpp index b201bd714..4c04bf6cb 100644 --- a/examples/speculative/speculative.cpp +++ b/examples/speculative/speculative.cpp @@ -190,8 +190,8 @@ int main(int argc, char ** argv) { drafts[s].smpl = common_sampler_init(model_dft, params.sparams); } - llama_batch batch_dft = llama_batch_init(params.n_ctx, 0, 1); - llama_batch batch_tgt = llama_batch_init(params.n_ctx, 0, n_seq_dft); + llama_batch batch_dft = llama_batch_init(llama_n_ctx(ctx_dft), 0, 1); + llama_batch batch_tgt = llama_batch_init(llama_n_ctx(ctx_tgt), 0, n_seq_dft); const auto t_dec_start = ggml_time_us();