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

Function common_sampler_accept

smallthinker/common/sampling.cpp:300–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) {
301 if (accept_grammar) {
302 llama_sampler_accept(gsmpl->grmr, token);
303 }
304
305 llama_sampler_accept(gsmpl->chain, token);
306
307 gsmpl->prev.push_back(token);
308}
309
310void common_sampler_reset(struct common_sampler * gsmpl) {
311 llama_sampler_reset(gsmpl->grmr);

Callers 10

generate_responseFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
update_slotsMethod · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

llama_sampler_acceptFunction · 0.85
push_backMethod · 0.45

Tested by 2

mainFunction · 0.68