| 1264 | } |
| 1265 | |
| 1266 | static struct llama_sampler * llama_sampler_mirostat_clone(const struct llama_sampler * smpl) { |
| 1267 | const auto * ctx = (const llama_sampler_mirostat *) smpl->ctx; |
| 1268 | auto * result = llama_sampler_init_mirostat(ctx->n_vocab, ctx->seed, ctx->tau, ctx->eta, ctx->m); |
| 1269 | |
| 1270 | // copy the state |
| 1271 | { |
| 1272 | auto * result_ctx = (llama_sampler_mirostat *) smpl->ctx; |
| 1273 | |
| 1274 | result_ctx->mu = ctx->mu; |
| 1275 | result_ctx->rng = ctx->rng; |
| 1276 | } |
| 1277 | |
| 1278 | return result; |
| 1279 | } |
| 1280 | |
| 1281 | static void llama_sampler_mirostat_reset(struct llama_sampler * smpl) { |
| 1282 | auto * ctx = (llama_sampler_mirostat *) smpl->ctx; |
nothing calls this directly
no test coverage detected