diff --git a/llama.cpp b/llama.cpp index 3910d50f7..f38d159f1 100644 --- a/llama.cpp +++ b/llama.cpp @@ -12467,7 +12467,7 @@ static ggml_type llama_tensor_get_type(quantize_state_internal & qs, ggml_type n new_type = GGML_TYPE_Q2_K; } else if (ftype == LLAMA_FTYPE_MOSTLY_IQ1_XS) { - if (qs.model.hparams.n_expert >= 2) new_type = GGML_TYPE_Q2_K; + if (qs.model.hparams.n_gqa() == 4 || qs.model.hparams.n_expert >= 2) new_type = GGML_TYPE_Q2_K; else new_type = GGML_TYPE_IQ2_S; } else if (ftype == LLAMA_FTYPE_MOSTLY_IQ2_S || ftype == LLAMA_FTYPE_MOSTLY_IQ2_M) { @@ -12506,7 +12506,7 @@ static ggml_type llama_tensor_get_type(quantize_state_internal & qs, ggml_type n else new_type = GGML_TYPE_IQ2_XXS; } else if (name.find("attn_qkv.weight") != std::string::npos) { - if (qs.model.hparams.n_expert >= 2) new_type = GGML_TYPE_IQ4_XS; + if (qs.model.hparams.n_expert >= 2) new_type = GGML_TYPE_Q4_K; else new_type = GGML_TYPE_Q2_K; } } else if (ftype == LLAMA_FTYPE_MOSTLY_IQ2_XXS || ftype == LLAMA_FTYPE_MOSTLY_IQ2_XS || ftype == LLAMA_FTYPE_MOSTLY_IQ1_S ||