From 4135d4a50564c9913b911c4d87458b50b09e4e6f Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Sat, 16 Mar 2024 14:26:17 +0100 Subject: [PATCH] llama_load_model_from_url: typo --- common/common.cpp | 4 ++-- common/common.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index fc315e2fb..45187a7c6 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1390,7 +1390,7 @@ void llama_batch_add( #ifdef LLAMA_USE_CURL struct llama_model * llama_load_model_from_url(const char * model_url, const char * path_model, struct llama_model_params params) { - // Initialize libcurl + // Initialize libcurl globally curl_global_init(CURL_GLOBAL_DEFAULT); auto curl = curl_easy_init(); @@ -1400,7 +1400,7 @@ struct llama_model * llama_load_model_from_url(const char * model_url, const cha return nullptr; } - // Set the URL + // Set the URL, allow to follow http redirection and display download progress curl_easy_setopt(curl, CURLOPT_URL, model_url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); diff --git a/common/common.h b/common/common.h index b9b592112..3e5dd661c 100644 --- a/common/common.h +++ b/common/common.h @@ -95,7 +95,7 @@ struct gpt_params { struct llama_sampling_params sparams; std::string model = "models/7B/ggml-model-f16.gguf"; // model path - std::string model_url = ""; // model path + std::string model_url = ""; // model url to download std::string model_draft = ""; // draft model for speculative decoding std::string model_alias = "unknown"; // model alias std::string prompt = "";