From dd6a8db94555e16d1f28a9d91a6c38e68ea2fdf0 Mon Sep 17 00:00:00 2001 From: kalomaze <66376113+kalomaze@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:05:36 -0600 Subject: [PATCH] Change default expert count to 2 --- llama.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llama.cpp b/llama.cpp index b585fd48d15ab..36b6e8ab99933 100644 --- a/llama.cpp +++ b/llama.cpp @@ -2470,8 +2470,8 @@ static void llm_load_hparams( ml.get_key (LLM_KV_BLOCK_COUNT, hparams.n_layer); ml.get_key (LLM_KV_EXPERT_COUNT, hparams.n_expert, false); - // Declare the custom expert used count variable and initialize it to 1 - int CUSTOM_EXPERT_USED_COUNT = 1; + // Declare the custom expert used count variable and initialize it to 2 + int CUSTOM_EXPERT_USED_COUNT = 2; std::string filename = "experts.txt"; // Try to open the file for reading @@ -2481,14 +2481,14 @@ static void llm_load_hparams( if (!(infile >> CUSTOM_EXPERT_USED_COUNT)) { // If reading fails, set CUSTOM_EXPERT_USED_COUNT to an error value or handle the error as needed printf("Error reading from file: %s\n", filename.c_str()); - CUSTOM_EXPERT_USED_COUNT = 1; // Default value or error value + CUSTOM_EXPERT_USED_COUNT = 2; // Default value } infile.close(); // Close the file after reading or failing to read } else { // The file doesn't exist or couldn't be opened for reading. Try creating it. std::ofstream outfile(filename); if (outfile.is_open()) { - outfile << CUSTOM_EXPERT_USED_COUNT; // Write 1 to the file + outfile << CUSTOM_EXPERT_USED_COUNT; // Write 2 to the file outfile.close(); // Close the file after writing } else { // If the file couldn't be opened for writing, print an error message