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

Function llama_sampler_clone

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

Source from the content-addressed store, hash-verified

350}
351
352struct llama_sampler * llama_sampler_clone(const struct llama_sampler * smpl) {
353 if (smpl->iface->clone) {
354 return smpl->iface->clone(smpl);
355 }
356
357 if (smpl->ctx == nullptr) {
358 return llama_sampler_init(
359 /* .iface = */ smpl->iface,
360 /* .ctx = */ nullptr
361 );
362 }
363
364 GGML_ABORT("the sampler does not support cloning");
365}
366
367void llama_sampler_free(struct llama_sampler * smpl) {
368 if (smpl == nullptr) {

Callers 2

common_sampler_cloneFunction · 0.85

Calls 2

llama_sampler_initFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected