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

Function llama_sampler_xtc_clone

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

Source from the content-addressed store, hash-verified

1159}
1160
1161static struct llama_sampler * llama_sampler_xtc_clone(const struct llama_sampler * smpl) {
1162 const auto * ctx = (const llama_sampler_xtc *) smpl->ctx;
1163 auto * result = llama_sampler_init_xtc(ctx->probability, ctx->threshold, ctx->min_keep, ctx->seed);
1164
1165 // copy the state
1166 {
1167 auto * result_ctx = (llama_sampler_xtc *) result->ctx;
1168
1169 result_ctx->rng = ctx->rng;
1170 }
1171
1172 return result;
1173}
1174
1175static void llama_sampler_xtc_free(struct llama_sampler * smpl) {
1176 delete (llama_sampler_xtc *) smpl->ctx;

Callers

nothing calls this directly

Calls 1

llama_sampler_init_xtcFunction · 0.85

Tested by

no test coverage detected