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

Function llama_beam_search

llama.cpp:8917–8929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8915};
8916
8917void 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

Callers 1

mainFunction · 0.85

Calls 2

loopMethod · 0.80
ggml_time_usFunction · 0.70

Tested by

no test coverage detected