From 0324696b8e5fe340dc94b64714e4c9aab03084a2 Mon Sep 17 00:00:00 2001 From: Jonas Jankaitis <111707981+John-194@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:21:37 +0300 Subject: [PATCH] fit : count nextn (MTP) blocks in n_gpu_layers so front layers stay on GPU (#26177) --- common/fit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fit.cpp b/common/fit.cpp index c79221cb0..c82d066ad 100644 --- a/common/fit.cpp +++ b/common/fit.cpp @@ -136,7 +136,7 @@ static std::vector common_get_device_memory_data_impl( devs.push_back(llama_model_get_device(model, i)); } - hp_ngl = llama_model_n_layer(model); + hp_ngl = llama_model_n_layer(model) + llama_model_n_layer_nextn(model); hp_n_ctx_train = llama_model_n_ctx_train(model); hp_n_expert = llama_model_n_expert(model);