]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
completion : remove useless statics (#24226)
authorAdrien Gallouët <redacted>
Sat, 6 Jun 2026 10:16:16 +0000 (12:16 +0200)
committerGitHub <redacted>
Sat, 6 Jun 2026 10:16:16 +0000 (12:16 +0200)
Signed-off-by: Adrien Gallouët <redacted>
tools/completion/completion.cpp

index 2a957963f81e7d5c2f0d2712a21e53216421d837..6747558fc54332563791c7ef312f1264a63d4693 100644 (file)
 #endif
 
 static llama_context           ** g_ctx;
-static llama_model             ** g_model;
 static common_sampler          ** g_smpl;
 static common_params            * g_params;
-static std::vector<llama_token> * g_input_tokens;
-static std::ostringstream       * g_output_ss;
-static std::vector<llama_token> * g_output_tokens;
 static bool is_interacting  = false;
 static bool need_insert_eot = false;
 
@@ -136,7 +132,6 @@ int llama_completion(int argc, char ** argv) {
     llama_context * ctx = nullptr;
     common_sampler * smpl = nullptr;
 
-    g_model = &model;
     g_ctx = &ctx;
     g_smpl = &smpl;
 
@@ -549,9 +544,9 @@ int llama_completion(int argc, char ** argv) {
     int n_consumed         = 0;
     int n_session_consumed = 0;
 
-    std::vector<int>   input_tokens;  g_input_tokens  = &input_tokens;
-    std::vector<int>   output_tokens; g_output_tokens = &output_tokens;
-    std::ostringstream output_ss;     g_output_ss     = &output_ss;
+    std::vector<int>   input_tokens;
+    std::vector<int>   output_tokens;
+    std::ostringstream output_ss;
     std::ostringstream assistant_ss; // for storing current assistant message, used in conversation mode
 
     // the first thing we will do is to output the prompt, so set color accordingly