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

Function llama_sampler_dist_apply

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

Source from the content-addressed store, hash-verified

574}
575
576static void llama_sampler_dist_apply(struct llama_sampler * smpl, llama_token_data_array * cur_p) {
577 auto * ctx = (llama_sampler_dist *) smpl->ctx;
578
579 llama_sampler_softmax_impl(cur_p);
580
581 cur_p->selected = llama_sample_dist(cur_p, ctx->rng);
582}
583
584static struct llama_sampler * llama_sampler_dist_clone(const struct llama_sampler * smpl) {
585 const auto * ctx = (const llama_sampler_dist *) smpl->ctx;

Callers

nothing calls this directly

Calls 2

llama_sample_distFunction · 0.85

Tested by

no test coverage detected