Add a numeric context parameter declaring the maximum outputs one sequence

This commit is contained in:
Gaurav Garg
2026-07-05 02:48:13 +05:30
parent 0eddfa0b4c
commit eab4e8444f
14 changed files with 120 additions and 72 deletions
+6
View File
@@ -23,6 +23,12 @@ static void test(void) {
std::numeric_limits<int32_t>::max(),
std::numeric_limits<int32_t>::max(),
std::numeric_limits<int32_t>::max()) == std::numeric_limits<int32_t>::max());
assert(common_speculative_n_outputs_per_seq_max(16, 3) == 4);
assert(common_speculative_n_outputs_per_seq_max(16, -1) == 1);
assert(common_speculative_n_outputs_per_seq_max(2, 3) == 2);
assert(common_speculative_n_outputs_per_seq_max(
std::numeric_limits<int32_t>::max(),
std::numeric_limits<int32_t>::max()) == std::numeric_limits<int32_t>::max());
printf("test-arg-parser: make sure there is no duplicated arguments in any examples\n\n");
for (int ex = 0; ex < LLAMA_EXAMPLE_COUNT; ex++) {