Skip to content

Commit 43b40d3

Browse files
committed
context : fail upon construction if sequences exceed max value
ggml-ci
1 parent 6221dd2 commit 43b40d3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/llama-context.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ llama_context::llama_context(
2727

2828
cparams.n_seq_max = std::max(1u, params.n_seq_max);
2929
if (cparams.n_seq_max > LLAMA_MAX_PARALLEL_SEQUENCES) {
30-
LLAMA_LOG_WARN("%s: n_seq_max (%d) is larger than the maximum supported (%d) - clamping\n", __func__, cparams.n_seq_max, LLAMA_MAX_PARALLEL_SEQUENCES);
31-
cparams.n_seq_max = LLAMA_MAX_PARALLEL_SEQUENCES;
30+
throw std::runtime_error("n_seq_max must be <= " + std::to_string(LLAMA_MAX_PARALLEL_SEQUENCES));
3231
}
3332

3433
cparams.n_threads = params.n_threads;

0 commit comments

Comments
 (0)