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

Method initialize_context

smallthinker/tools/run/run.cpp:893–900  ·  view source on GitHub ↗

Initializes the context with the specified parameters

Source from the content-addressed store, hash-verified

891
892 // Initializes the context with the specified parameters
893 llama_context_ptr initialize_context(const llama_model_ptr & model, const Opt & opt) {
894 llama_context_ptr context(llama_init_from_model(model.get(), opt.ctx_params));
895 if (!context) {
896 printe("%s: error: failed to create the llama_context\n", __func__);
897 }
898
899 return context;
900 }
901
902 // Initializes and configures the sampler
903 llama_sampler_ptr initialize_sampler(const Opt & opt) {

Callers

nothing calls this directly

Calls 3

llama_init_from_modelFunction · 0.85
printeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected