]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
quantize : fix minor logic flaw in --tensor-type (#14572)
authorEd Addario <redacted>
Sun, 13 Jul 2025 16:02:17 +0000 (17:02 +0100)
committerGitHub <redacted>
Sun, 13 Jul 2025 16:02:17 +0000 (18:02 +0200)
src/llama-quant.cpp

index 4dbd1e309919a52c98b25fa93ac1a514c8641d03..a00af7a1d1758855ec5f8febba2c4a0015cb7710 100644 (file)
@@ -884,8 +884,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
                         if (std::regex pattern(tname); std::regex_search(tensor_name, pattern)) {
                             if  (qtype != new_type) {
                                 LLAMA_LOG_DEBUG("(overriding %s) ", ggml_type_name(new_type));
-                                new_type = qtype;
-                                break; // if two or more types are specified for the tensor, first match wins
+                                new_type = qtype; // if two or more types are specified for the same tensor, the last match wins
                             }
                         }
                     }