| 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); |
| 99 | |
| 100 | DUMP(&tester.cur_p); |
| 101 | tester.apply(llama_sampler_init_top_p(p, 0)); |
| 102 | tester.apply(llama_sampler_init_dist (0)); |
| 103 | DUMP(&tester.cur_p); |
| 104 | |
| 105 | tester.check(); |
| 106 | } |
| 107 | |
| 108 | static void test_min_p(const std::vector<float> & probs, const std::vector<float> & probs_expected, float p) { |
| 109 | sampler_tester tester(probs, probs_expected); |
no test coverage detected