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

Function llama_sampler_free

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

Source from the content-addressed store, hash-verified

365}
366
367void llama_sampler_free(struct llama_sampler * smpl) {
368 if (smpl == nullptr) {
369 return;
370 }
371
372 if (smpl->iface->free) {
373 smpl->iface->free(smpl);
374 }
375
376 delete smpl;
377}
378
379llama_token llama_sampler_sample(struct llama_sampler * smpl, struct llama_context * ctx, int32_t idx) {
380 const auto * logits = llama_get_logits_ith(ctx, idx);

Callers 13

llama_sampler_chain_freeFunction · 0.85
applyMethod · 0.85
benchFunction · 0.85
testFunction · 0.85
common_sampler_freeFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

freeMethod · 0.45

Tested by 3

applyMethod · 0.68
benchFunction · 0.68
testFunction · 0.68