From: Xuan-Son Nguyen Date: Mon, 9 Mar 2026 22:42:24 +0000 (+0100) Subject: model: fix step3.5 n_rot (#20318) X-Git-Tag: upstream/0.0.8611~347 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=0842b9b465f73a133062e80b74201c86e73a67c8;p=pkg%2Fggml%2Fsources%2Fllama.cpp model: fix step3.5 n_rot (#20318) --- diff --git a/src/llama-model.cpp b/src/llama-model.cpp index 349f70a61..0fa47e1b4 100644 --- a/src/llama-model.cpp +++ b/src/llama-model.cpp @@ -7348,7 +7348,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) { // ("rope_freqs.weight") and ggml uses only the first (n_rot_l/2) entries per layer. uint32_t n_rot_max = 0; for (int i = 0; i < n_layer; ++i) { - n_rot_max = std::max(n_rot_max, hparams.n_rot()); + n_rot_max = std::max(n_rot_max, hparams.n_rot(i)); } if (n_rot_max == 0) { n_rot_max = n_rot;