GLiNER2.5-multi-Decide-GGUF / gliner-quant-loader.patch
Hansda's picture
Publish GLiNER2.5-multi-Decide-Q4_K.gguf
1464c5a verified
Raw History Blame Contribute Delete
802 Bytes
diff --git a/src/gguf.cpp b/src/gguf.cpp
index 4f3e0f4..f9293e0 100644
--- a/src/gguf.cpp
+++ b/src/gguf.cpp
@@ -179,7 +179,9 @@ ggml_tensor * GgufFile::tensor(ggml_context * ctx, const std::string & name,
const int64_t id = gguf_find_tensor(ctx_, stored.c_str());
if (id < 0) throw std::runtime_error("Missing tensor: " + name);
const ggml_type type = gguf_get_tensor_type(ctx_, id);
- if (type != GGML_TYPE_F32 && type != GGML_TYPE_F16) {
+ if (type != GGML_TYPE_F32 && type != GGML_TYPE_F16 &&
+ type != GGML_TYPE_Q2_K && type != GGML_TYPE_Q3_K && type != GGML_TYPE_Q4_K &&
+ type != GGML_TYPE_Q6_K && type != GGML_TYPE_Q8_0) {
throw std::runtime_error("Unsupported tensor type: " + name);
}
const int64_t * dims = gguf_get_tensor_ne(ctx_, id);