diff --git a/tools/lcpp.patch b/tools/lcpp.patch index 0ad92d1..9c522ce 100644 --- a/tools/lcpp.patch +++ b/tools/lcpp.patch @@ -39,7 +39,7 @@ index b16c462f..6d1568f1 100644 const int idx = gguf_find_tensor(ctx, name); if (idx < 0) { diff --git a/src/llama.cpp b/src/llama.cpp -index 24e1f1f0..f90738cf 100644 +index 24e1f1f0..d3ca4756 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -205,6 +205,14 @@ enum llm_arch { @@ -296,7 +296,7 @@ index 24e1f1f0..f90738cf 100644 } // Set split info if needed -@@ -18647,6 +18850,82 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s +@@ -18647,6 +18850,83 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s // do not quantize relative position bias (T5) quantize &= name.find("attn_rel_b.weight") == std::string::npos; @@ -369,6 +369,7 @@ index 24e1f1f0..f90738cf 100644 + quantize &= name.find("text_embedding.") == std::string::npos; + quantize &= name.find("time_projection.") == std::string::npos; + quantize &= name.find("time_embedding.") == std::string::npos; ++ quantize &= name.find("img_emb.") == std::string::npos; + quantize &= name.find("head.") == std::string::npos; + } + // ignore 3D/4D tensors for image models as the code was never meant to handle these @@ -379,7 +380,7 @@ index 24e1f1f0..f90738cf 100644 enum ggml_type new_type; void * new_data; size_t new_size; -@@ -18655,6 +18934,9 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s +@@ -18655,6 +18935,9 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s new_type = default_type; // get more optimal quantization type based on the tensor shape, layer, etc. @@ -389,7 +390,7 @@ index 24e1f1f0..f90738cf 100644 if (!params->pure && ggml_is_quantized(default_type)) { new_type = llama_tensor_get_type(qs, new_type, tensor, ftype); } -@@ -18664,6 +18946,7 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s +@@ -18664,6 +18947,7 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s if (params->output_tensor_type < GGML_TYPE_COUNT && strcmp(tensor->name, "output.weight") == 0) { new_type = params->output_tensor_type; }