Initializes the context with the specified parameters
| 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) { |
nothing calls this directly
no test coverage detected