llama: add patch to avoid errors on arrays of strigns
This commit is contained in:
parent
e2252d0fc6
commit
554aed43bd
21
llama/patches/0019-allow-arrays-of-strings.patch
Normal file
21
llama/patches/0019-allow-arrays-of-strings.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jmorganca <jmorganca@gmail.com>
|
||||||
|
Date: Wed, 5 Mar 2025 17:41:07 -0800
|
||||||
|
Subject: [PATCH] allow arrays of strings
|
||||||
|
|
||||||
|
---
|
||||||
|
ggml/src/gguf.cpp | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/ggml/src/gguf.cpp b/ggml/src/gguf.cpp
|
||||||
|
index ab13669c..9dfefd43 100644
|
||||||
|
--- a/ggml/src/gguf.cpp
|
||||||
|
+++ b/ggml/src/gguf.cpp
|
||||||
|
@@ -777,7 +777,6 @@ enum gguf_type gguf_get_arr_type(const struct gguf_context * ctx, int64_t key_id
|
||||||
|
|
||||||
|
const void * gguf_get_arr_data(const struct gguf_context * ctx, int64_t key_id) {
|
||||||
|
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
|
||||||
|
- GGML_ASSERT(ctx->kv[key_id].get_type() != GGUF_TYPE_STRING);
|
||||||
|
return ctx->kv[key_id].data.data();
|
||||||
|
}
|
||||||
|
|
1
ml/backend/ggml/ggml/src/gguf.cpp
vendored
1
ml/backend/ggml/ggml/src/gguf.cpp
vendored
@ -777,7 +777,6 @@ enum gguf_type gguf_get_arr_type(const struct gguf_context * ctx, int64_t key_id
|
|||||||
|
|
||||||
const void * gguf_get_arr_data(const struct gguf_context * ctx, int64_t key_id) {
|
const void * gguf_get_arr_data(const struct gguf_context * ctx, int64_t key_id) {
|
||||||
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
|
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
|
||||||
GGML_ASSERT(ctx->kv[key_id].get_type() != GGUF_TYPE_STRING);
|
|
||||||
return ctx->kv[key_id].data.data();
|
return ctx->kv[key_id].data.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user