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

Function test_temp

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

Source from the content-addressed store, hash-verified

62};
63
64static void test_temp(const std::vector<float> & probs, const std::vector<float> & probs_expected, float temp) {
65 sampler_tester tester(probs, probs_expected);
66
67 DUMP(&tester.cur_p);
68 tester.apply(llama_sampler_init_temp(temp));
69 tester.apply(llama_sampler_init_dist(0));
70 DUMP(&tester.cur_p);
71
72 tester.check();
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);

Callers 1

mainFunction · 0.85

Calls 4

llama_sampler_init_tempFunction · 0.85
llama_sampler_init_distFunction · 0.85
applyMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected