MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / test_temp_ext

Function test_temp_ext

smallthinker/tests/test-sampling.cpp:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static void test_temp_ext(const std::vector<float> & probs, const std::vector<float> & probs_expected, float temp, float delta, float exponent) {
76 sampler_tester tester(probs, probs_expected);
77
78 DUMP(&tester.cur_p);
79 tester.apply(llama_sampler_init_temp_ext(temp, delta, exponent));
80 tester.apply(llama_sampler_init_dist (0));
81 DUMP(&tester.cur_p);
82
83 tester.check();
84}
85
86static void test_top_k(const std::vector<float> & probs, const std::vector<float> & probs_expected, int k) {
87 sampler_tester tester(probs, probs_expected);

Callers 1

mainFunction · 0.85

Calls 4

llama_sampler_init_distFunction · 0.85
applyMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected