]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
gguf-split: add --no-tensor-first-split (llama/7072)
authorXuan Son Nguyen <redacted>
Sat, 4 May 2024 16:56:22 +0000 (18:56 +0200)
committerGeorgi Gerganov <redacted>
Sat, 11 May 2024 18:30:08 +0000 (21:30 +0300)
src/ggml.c

index 00f3e170a16b95d6fa603f900f9344174ffa8373..84b76fcb96966297bdbbc966516fdb6e160648ad 100644 (file)
@@ -21210,7 +21210,7 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
     }
 
     // read the tensor infos
-    {
+    if (ctx->header.n_tensors > 0) {
         ctx->infos = GGML_CALLOC(ctx->header.n_tensors, sizeof(struct gguf_tensor_info));
 
         for (uint64_t i = 0; i < ctx->header.n_tensors; ++i) {