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

Function test_xtc

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

Source from the content-addressed store, hash-verified

117}
118
119static void test_xtc(const std::vector<float> & probs, const std::vector<float> & probs_expected, float p, float t) {
120 sampler_tester tester(probs, probs_expected);
121
122 DUMP(&tester.cur_p);
123 tester.apply(llama_sampler_init_xtc(p, t, 0, 0));
124 DUMP(&tester.cur_p);
125
126 tester.check();
127}
128
129static void test_typical(const std::vector<float> & probs, const std::vector<float> & probs_expected, float p) {
130 sampler_tester tester(probs, probs_expected);

Callers 1

mainFunction · 0.85

Calls 3

llama_sampler_init_xtcFunction · 0.85
applyMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected