| 84 | } |
| 85 | |
| 86 | static void test_top_k(const std::vector<float> & probs, const std::vector<float> & probs_expected, int k) { |
| 87 | sampler_tester tester(probs, probs_expected); |
| 88 | |
| 89 | DUMP(&tester.cur_p); |
| 90 | tester.apply(llama_sampler_init_top_k(k)); |
| 91 | tester.apply(llama_sampler_init_dist (0)); |
| 92 | DUMP(&tester.cur_p); |
| 93 | |
| 94 | tester.check(); |
| 95 | } |
| 96 | |
| 97 | static void test_top_p(const std::vector<float> & probs, const std::vector<float> & probs_expected, float p) { |
| 98 | sampler_tester tester(probs, probs_expected); |
no test coverage detected