summaryrefslogtreecommitdiff
path: root/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2023-12-14 16:52:08 +0100
committerGitHub <noreply@github.com>2023-12-14 16:52:08 +0100
commitcafcd4f89500b8afef722cdb08088eceb8a22572 (patch)
treeab3967dc84020b6be46c378ddaf42a8f9da607f1 /examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
parentc50e40016394f124b97ce39da48148b1f6c01833 (diff)
ggml : remove n_dims from ggml_tensor (#4469)
ggml-ci
Diffstat (limited to 'examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp')
-rw-r--r--examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
index cae3bf3c..4d41e177 100644
--- a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
+++ b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
@@ -427,7 +427,7 @@ static void print_row(struct ggml_tensor * probs, int i) {
}
static void print_matrix(struct ggml_tensor * probs) {
- assert(probs->n_dims == 2);
+ assert(ggml_is_matrix(probs));
for (int i = 0; i < probs->ne[1]; ++i) {
for (int k = 0; k < probs->ne[0]; ++k) {
float p = get_f32_2d(probs, k, i);
@@ -639,7 +639,7 @@ static void load_vocab(const char *filename, Config *config, struct llama_vocab
static void convert_weights_ak_to_gg(struct ggml_tensor * gg_weights, const float * karpathy_weights) {
int ct;
- switch (gg_weights->n_dims){
+ switch (ggml_n_dims(gg_weights)) {
case 1:
ct = 0;
for (int i0 = 0; i0 < gg_weights->ne[0]; i0++){