@@ -2470,8 +2470,8 @@ static void llm_load_hparams(
2470
2470
ml.get_key (LLM_KV_BLOCK_COUNT, hparams.n_layer);
2471
2471
ml.get_key (LLM_KV_EXPERT_COUNT, hparams.n_expert, false);
2472
2472
2473
- // Declare the custom expert used count variable and initialize it to 1
2474
- int CUSTOM_EXPERT_USED_COUNT = 1 ;
2473
+ // Declare the custom expert used count variable and initialize it to 2
2474
+ int CUSTOM_EXPERT_USED_COUNT = 2 ;
2475
2475
std::string filename = "experts.txt";
2476
2476
2477
2477
// Try to open the file for reading
@@ -2481,14 +2481,14 @@ static void llm_load_hparams(
2481
2481
if (!(infile >> CUSTOM_EXPERT_USED_COUNT)) {
2482
2482
// If reading fails, set CUSTOM_EXPERT_USED_COUNT to an error value or handle the error as needed
2483
2483
printf("Error reading from file: %s\n", filename.c_str());
2484
- CUSTOM_EXPERT_USED_COUNT = 1 ; // Default value or error value
2484
+ CUSTOM_EXPERT_USED_COUNT = 2 ; // Default value
2485
2485
}
2486
2486
infile.close(); // Close the file after reading or failing to read
2487
2487
} else {
2488
2488
// The file doesn't exist or couldn't be opened for reading. Try creating it.
2489
2489
std::ofstream outfile(filename);
2490
2490
if (outfile.is_open()) {
2491
- outfile << CUSTOM_EXPERT_USED_COUNT; // Write 1 to the file
2491
+ outfile << CUSTOM_EXPERT_USED_COUNT; // Write 2 to the file
2492
2492
outfile.close(); // Close the file after writing
2493
2493
} else {
2494
2494
// If the file couldn't be opened for writing, print an error message
0 commit comments