Skip to content

Commit 272a845

Browse files
committed
Fix logic flaw so that when two or more quant types are specified via --tensor-type for the same tensor, the last list entry wins
1 parent a0374a6 commit 272a845

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
@@ -883,8 +883,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
883883
if (std::regex pattern(tname); std::regex_search(tensor_name, pattern)) {
884884
if (qtype != new_type) {
885885
LLAMA_LOG_DEBUG("(overriding %s) ", ggml_type_name(new_type));
886-
new_type = qtype;
887-
break; // if two or more types are specified for the tensor, first match wins
886+
new_type = qtype; // if two or more types are specified for the same tensor, the last match wins
888887
}
889888
}
890889
}

0 commit comments

Comments
 (0)