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

Function common_sampler_print

smallthinker/common/sampling.cpp:437–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437std::string common_sampler_print(const struct common_sampler * gsmpl) {
438 std::string result = "logits ";
439
440 for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) {
441 const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i);
442 result += std::string("-> ") + llama_sampler_name(smpl) + " ";
443 }
444
445 return result;
446}
447
448std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) {
449 n = std::min(n, (int) gsmpl->prev.size());

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 4

llama_sampler_chain_nFunction · 0.85
llama_sampler_chain_getFunction · 0.85
llama_sampler_nameFunction · 0.85
stringClass · 0.50

Tested by

no test coverage detected