MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / set_sampler

Method set_sampler

src/common/AutoModel/automodel.cpp:482–487  ·  view source on GitHub ↗

\brief Set the sampler \param sampler_config the sampler config \note The function will set the sampler \note The function will reset the sampler \note The function will set the sampler config

Source from the content-addressed store, hash-verified

480/// \note The function will reset the sampler
481/// \note The function will set the sampler config
482void AutoModel::set_sampler(sampler_config& sampler_config) {
483 if (this->sampler != nullptr) {
484 this->sampler.reset();
485 }
486 this->sampler = std::make_unique<Sampler>(this->lm_config->vocab_size, sampler_config);
487}
488
489/// \brief Set the max length
490/// \param MAX_L the max length

Callers 13

load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80
load_modelMethod · 0.80

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected