Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tools/server/server-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ struct server_context_impl {

// load the model and initialize llama_context
// this may also be called to resume from sleeping state
bool load_model(const common_params & params) {
bool load_model(common_params & params) {
bool is_resume = sleeping;

SRV_INF("loading model '%s'\n", params.model.path.c_str());
Expand All @@ -641,6 +641,9 @@ struct server_context_impl {

llama_init = common_init_from_params(params_base);

// propagate model-metadata sampling defaults back to caller
params.sampling = params_base.sampling;

model = llama_init->model();
ctx = llama_init->context();

Expand Down Expand Up @@ -2978,7 +2981,7 @@ struct server_context_impl {
server_context::server_context() : impl(new server_context_impl()) {}
server_context::~server_context() = default;

bool server_context::load_model(const common_params & params) {
bool server_context::load_model(common_params & params) {
return impl->load_model(params);
}

Expand Down
2 changes: 1 addition & 1 deletion tools/server/server-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct server_context {

// load the model and initialize llama_context
// returns true on success
bool load_model(const common_params & params);
bool load_model(common_params & params);

// this function will block main thread until termination
void start_loop();
Expand Down
Loading