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

Method initialize_sampler

smallthinker/tools/run/run.cpp:903–910  ·  view source on GitHub ↗

Initializes and configures the sampler

Source from the content-addressed store, hash-verified

901
902 // Initializes and configures the sampler
903 llama_sampler_ptr initialize_sampler(const Opt & opt) {
904 llama_sampler_ptr sampler(llama_sampler_chain_init(llama_sampler_chain_default_params()));
905 llama_sampler_chain_add(sampler.get(), llama_sampler_init_min_p(0.05f, 1));
906 llama_sampler_chain_add(sampler.get(), llama_sampler_init_temp(opt.temperature));
907 llama_sampler_chain_add(sampler.get(), llama_sampler_init_dist(LLAMA_DEFAULT_SEED));
908
909 return sampler;
910 }
911};
912
913// Add a message to `messages` and store its content in `msg_strs`

Callers

nothing calls this directly

Calls 7

llama_sampler_chain_initFunction · 0.85
llama_sampler_chain_addFunction · 0.85
llama_sampler_init_min_pFunction · 0.85
llama_sampler_init_tempFunction · 0.85
llama_sampler_init_distFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected