File size: 802 Bytes
1464c5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);