From: Georgi Gerganov Date: Mon, 8 Apr 2024 13:23:01 +0000 (+0300) Subject: quantize : fix precedence of cli args (#6541) X-Git-Tag: upstream/0.0.4488~1855 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=b73e564b16086845a8b4fffd26e22685d3e0c3db;p=pkg%2Fggml%2Fsources%2Fllama.cpp quantize : fix precedence of cli args (#6541) --- diff --git a/llama.cpp b/llama.cpp index 9dde3efd..89ea3fe1 100644 --- a/llama.cpp +++ b/llama.cpp @@ -13562,10 +13562,10 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s if (!params->pure && ggml_is_quantized(default_type)) { new_type = llama_tensor_get_type(qs, new_type, tensor, ftype); } - else if (params->token_embedding_type < GGML_TYPE_COUNT && strcmp(tensor->name, "token_embd.weight") == 0) { + if (params->token_embedding_type < GGML_TYPE_COUNT && strcmp(tensor->name, "token_embd.weight") == 0) { new_type = params->token_embedding_type; } - else if (params->output_tensor_type < GGML_TYPE_COUNT && strcmp(tensor->name, "output.weight") == 0) { + if (params->output_tensor_type < GGML_TYPE_COUNT && strcmp(tensor->name, "output.weight") == 0) { new_type = params->output_tensor_type; }