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

Function llama_sampler_init_xtc

smallthinker/src/llama-sampling.cpp:1194–1207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1192};
1193
1194struct llama_sampler * llama_sampler_init_xtc(float p, float t, size_t min_keep, uint32_t seed) {
1195 auto seed_cur = get_rng_seed(seed);
1196 return llama_sampler_init(
1197 /* .iface = */ &llama_sampler_xtc_i,
1198 /* .ctx = */ new llama_sampler_xtc {
1199 /* .probability = */ p,
1200 /* .threshold = */ t,
1201 /* .min_keep = */ min_keep,
1202 /* .seed = */ seed,
1203 /* .seed_cur = */ seed_cur,
1204 /* .rng = */ std::mt19937(seed_cur),
1205 }
1206 );
1207}
1208
1209// mirostat
1210

Callers 4

llama_sampler_xtc_cloneFunction · 0.85
test_xtcFunction · 0.85
test_perfFunction · 0.85
common_sampler_initFunction · 0.85

Calls 2

get_rng_seedFunction · 0.85
llama_sampler_initFunction · 0.85

Tested by 2

test_xtcFunction · 0.68
test_perfFunction · 0.68