Skip to content

Commit efac2d4

Browse files
committed
common : don't do warm-up with more than n_batch tokens (close #3058)
ggml-ci
1 parent 7833796 commit efac2d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ std::tuple<struct llama_model *, struct llama_context *> llama_init_from_gpt_par
773773
LOG("warming up the model with an empty run\n");
774774

775775
const std::vector<llama_token> tmp = { llama_token_bos(lctx), llama_token_eos(lctx), };
776-
llama_eval(lctx, tmp.data(), tmp.size(), 0, params.n_threads);
776+
llama_eval(lctx, tmp.data(), std::min(tmp.size(), (size_t) params.n_batch), 0, params.n_threads);
777777
llama_reset_timings(lctx);
778778
}
779779

0 commit comments

Comments
 (0)