diff --git a/common/common.cpp b/common/common.cpp index 991b34a5..88b00075 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1702,6 +1702,30 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) { } } + //update rank and n_world for consistency + uint32_t update_rank = 0; + uint32_t update_n_world = 1; + std::vector n_layer_window_temp = {n_layer_window[0]}; + std::vector n_gpu_layers_temp = {n_gpu_layers[0]}; + for(auto i=1; icparams.rank = rank; + ctx->cparams.n_world = n_world; + } +} + struct llama_context * llama_new_context_with_model( struct llama_model * model, struct llama_context_params params) {