mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-09 00:59:03 +00:00
fix: n_worker in draft model
(cherry picked from commit 921ad2b453b24b715ad5db6a703fb3df65fdcb80)
This commit is contained in:
parent
2b902f89bd
commit
deeec668b8
1 changed files with 2 additions and 1 deletions
|
@ -1682,6 +1682,7 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
|
||||||
cparams.n_layer_window[0] = n_layers;
|
cparams.n_layer_window[0] = n_layers;
|
||||||
mparams.n_layer_window[0] = n_layers;
|
mparams.n_layer_window[0] = n_layers;
|
||||||
llama_context_n_layer_window(lctx)[0] = n_layers;
|
llama_context_n_layer_window(lctx)[0] = n_layers;
|
||||||
|
llama_update_context_with_rankworld(lctx, 0, 1, 0, 1);
|
||||||
|
|
||||||
#if defined(GGML_USE_METAL) || defined(GGML_USE_CUDA)
|
#if defined(GGML_USE_METAL) || defined(GGML_USE_CUDA)
|
||||||
params.n_gpu_layers = std::min((int32_t)n_layers, params.n_gpu_layers);
|
params.n_gpu_layers = std::min((int32_t)n_layers, params.n_gpu_layers);
|
||||||
|
@ -1723,7 +1724,7 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// sychronize device profile to the master node
|
// sychronize device profile to the master node
|
||||||
NodeType node_type;
|
NodeType node_type = NodeType::NODE_TYPE_WORKER;
|
||||||
char is_forwarder[32] = {0};
|
char is_forwarder[32] = {0};
|
||||||
if (my_rank == 0) {
|
if (my_rank == 0) {
|
||||||
if (auto_schedule) {
|
if (auto_schedule) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue