Skip to content

Commit 982e347

Browse files
authored
quantize : fix minor logic flaw in --tensor-type (ggml-org#14572)
1 parent 923e3ea commit 982e347

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/llama-quant.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
884884
if (std::regex pattern(tname); std::regex_search(tensor_name, pattern)) {
885885
if (qtype != new_type) {
886886
LLAMA_LOG_DEBUG("(overriding %s) ", ggml_type_name(new_type));
887-
new_type = qtype;
888-
break; // if two or more types are specified for the tensor, first match wins
887+
new_type = qtype; // if two or more types are specified for the same tensor, the last match wins
889888
}
890889
}
891890
}

0 commit comments

Comments
 (0)