]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : fix uninitialized sampling context (close #3685)
authorGeorgi Gerganov <redacted>
Fri, 20 Oct 2023 10:06:10 +0000 (13:06 +0300)
committerGeorgi Gerganov <redacted>
Fri, 20 Oct 2023 10:06:10 +0000 (13:06 +0300)
examples/server/server.cpp

index 28b3f3f53f0d9016a1b20133eabab3ef69434cf2..0471528a34bf46b32d91899d18d79abf9e187377 100644 (file)
@@ -198,7 +198,7 @@ struct llama_server_context
     llama_model *model = nullptr;
     llama_context *ctx = nullptr;
     gpt_params params;
-    llama_sampling_context *ctx_sampling;
+    llama_sampling_context *ctx_sampling = nullptr;
     int n_ctx;
 
     bool truncated = false;