Spaces:
Running
Running
Xuan Son Nguyen
commited on
Commit
·
b9bc04d
1
Parent(s):
4cf786d
gguf-split: add --no-tensor-first-split (llama/7072)
Browse files
ggml.c
CHANGED
|
@@ -21210,7 +21210,7 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
|
|
| 21210 |
}
|
| 21211 |
|
| 21212 |
// read the tensor infos
|
| 21213 |
-
{
|
| 21214 |
ctx->infos = GGML_CALLOC(ctx->header.n_tensors, sizeof(struct gguf_tensor_info));
|
| 21215 |
|
| 21216 |
for (uint64_t i = 0; i < ctx->header.n_tensors; ++i) {
|
|
|
|
| 21210 |
}
|
| 21211 |
|
| 21212 |
// read the tensor infos
|
| 21213 |
+
if (ctx->header.n_tensors > 0) {
|
| 21214 |
ctx->infos = GGML_CALLOC(ctx->header.n_tensors, sizeof(struct gguf_tensor_info));
|
| 21215 |
|
| 21216 |
for (uint64_t i = 0; i < ctx->header.n_tensors; ++i) {
|