]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
quant : allow using manual tensor types with --pure (#25716)
authorGeorgi Gerganov <redacted>
Thu, 16 Jul 2026 05:30:20 +0000 (08:30 +0300)
committerGitHub <redacted>
Thu, 16 Jul 2026 05:30:20 +0000 (08:30 +0300)
src/llama-quant.cpp

index aebbc1ffb6f167770b11d4cd138c6adc1cd0ccf3..b66759b277608f6f3d204994b2113242a774102a 100644 (file)
@@ -673,7 +673,7 @@ static ggml_type llama_tensor_get_type(quantize_state_impl & qs, const llama_mod
     ggml_type new_type = default_type;
 
     // get more optimal quantization type based on the tensor shape, layer, etc.
-    if (!params->pure && ggml_is_quantized(default_type)) {
+    if (ggml_is_quantized(default_type)) {
         // if the user provided tensor types - use those
         bool manual = false;
         if (!qs.tensor_type_patterns.empty()) {
@@ -692,7 +692,7 @@ static ggml_type llama_tensor_get_type(quantize_state_impl & qs, const llama_mod
         }
 
         // if not manual - use the standard logic for choosing the quantization type based on the selected mixture
-        if (!manual) {
+        if (!manual && !params->pure) {
             new_type = llama_tensor_get_type_impl(qs, new_type, tensor, params->ftype, tm.category);
         }