| 405 | } |
| 406 | |
| 407 | void common_sampler_free(struct common_sampler * gsmpl) { |
| 408 | if (!gsmpl) { |
| 409 | return; |
| 410 | } |
| 411 | |
| 412 | llama_sampler_free(gsmpl->grmr); |
| 413 | llama_sampler_free(gsmpl->rbudget); |
| 414 | llama_sampler_free(gsmpl->chain); |
| 415 | |
| 416 | delete gsmpl; |
| 417 | } |
| 418 | |
| 419 | static bool grammar_should_apply(struct common_sampler * gsmpl) { |
| 420 | if (!gsmpl->grmr) { |