]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
fit : count nextn (MTP) blocks in n_gpu_layers so front layers stay on GPU (#26177)
authorJonas Jankaitis <redacted>
Mon, 27 Jul 2026 13:21:37 +0000 (16:21 +0300)
committerGitHub <redacted>
Mon, 27 Jul 2026 13:21:37 +0000 (16:21 +0300)
common/fit.cpp

index c79221cb00fafad29628a63365f76b88fe8b4dd8..c82d066ad444cde075ef65862048df672ea02892 100644 (file)
@@ -136,7 +136,7 @@ static std::vector<llama_device_memory_data> 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);