| 8915 | }; |
| 8916 | |
| 8917 | void llama_beam_search(llama_context * ctx, |
| 8918 | llama_beam_search_callback_fn_t callback, void * callback_data, |
| 8919 | size_t n_beams, int n_past, int n_predict) { |
| 8920 | assert(ctx); |
| 8921 | const int64_t t_start_sample_us = ggml_time_us(); |
| 8922 | |
| 8923 | llama_beam_search_data beam_search_data(ctx, n_beams, n_past, n_predict); |
| 8924 | |
| 8925 | beam_search_data.loop(callback, callback_data); |
| 8926 | |
| 8927 | ctx->t_sample_us += ggml_time_us() - t_start_sample_us; |
| 8928 | ctx->n_sample++; |
| 8929 | } |
| 8930 | |
| 8931 | // |
| 8932 | // quantization |
no test coverage detected