File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -976,8 +976,6 @@ struct common_init_result common_init_context_from_model(
976976 const llama_vocab * vocab = llama_model_get_vocab (model);
977977
978978 auto cparams = common_context_params_to_llama (params);
979- cparams.samplers = params.backend_samplers ;
980- cparams.n_samplers = params.n_backend_samplers ;
981979
982980 llama_context * lctx = llama_init_from_model (model, cparams);
983981 if (lctx == NULL ) {
@@ -1247,6 +1245,9 @@ struct llama_context_params common_context_params_to_llama(const common_params &
12471245 cparams.type_k = params.cache_type_k ;
12481246 cparams.type_v = params.cache_type_v ;
12491247
1248+ cparams.samplers = params.backend_samplers ;
1249+ cparams.n_samplers = params.n_backend_samplers ;
1250+
12501251 return cparams;
12511252}
12521253
Original file line number Diff line number Diff line change @@ -146,8 +146,9 @@ int main(int argc, char ** argv) {
146146
147147 // Configure backend sampler if configured
148148 llama_sampler * backend_sampler = common_sampler_backend_init (model, sparams);
149+ llama_sampler_seq_config sampler_config = { 0 , backend_sampler };
150+
149151 if (backend_sampler) {
150- llama_sampler_seq_config sampler_config = { 0 , backend_sampler };
151152 params.backend_samplers = &sampler_config;
152153 params.n_backend_samplers = 1 ;
153154 }
You can’t perform that action at this time.
0 commit comments