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

Function common_sampler_clone

smallthinker/common/sampling.cpp:316–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316struct common_sampler * common_sampler_clone(common_sampler * gsmpl) {
317 return new common_sampler {
318 /* .params = */ gsmpl->params,
319 /* .grmr = */ llama_sampler_clone(gsmpl->grmr),
320 /* .chain = */ llama_sampler_clone(gsmpl->chain),
321 /* .prev = */ gsmpl->prev,
322 /* .cur = */ gsmpl->cur,
323 /* .cur_p = */ gsmpl->cur_p,
324 };
325}
326
327void common_perf_print(const struct llama_context * ctx, const struct common_sampler * gsmpl) {
328 // TODO: measure grammar performance

Callers 1

mainFunction · 0.85

Calls 1

llama_sampler_cloneFunction · 0.85

Tested by 1

mainFunction · 0.68