Skip to content

Commit 39cabdc

Browse files
committed
add test for backend penalties sampling after top-p with large history window
1 parent e124d90 commit 39cabdc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test-backend-sampler.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,11 @@ static void test_backend_penalties_sampling(const test_params & params) {
12801280
return llama_sampler_init_top_p(0.9f, 0);
12811281
}, 64, 1.1f, 0.5f, 0.25f, "Hello", penalties_position::after_filter, true);
12821282

1283+
printf("Testing backend top-p followed by penalties with a large history window\n");
1284+
compare_masking_penalties_logits(params, "top-p large-window", []() {
1285+
return llama_sampler_init_top_p(0.9f, 0);
1286+
}, 4096, 1.1f, 0.5f, 0.25f, "Hello", penalties_position::after_filter, true);
1287+
12831288
printf("Testing backend penalties followed by top-p\n");
12841289
compare_masking_penalties_logits(params, "top-p", []() {
12851290
return llama_sampler_init_top_p(0.9f, 0);

0 commit comments

Comments
 (0)