From 9ea492f1ce255e81b08f25b781b3104bebd5765e Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Sun, 10 Mar 2024 10:41:40 -0700 Subject: [PATCH] convert: fix shape --- convert/convert.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert/convert.go b/convert/convert.go index fc1d2f7a..ba23080c 100644 --- a/convert/convert.go +++ b/convert/convert.go @@ -103,9 +103,9 @@ func ReadSafeTensors(fn string, offset uint64) ([]llm.Tensor, uint64, error) { return []llm.Tensor{}, 0, err } - shape := [4]uint64{1, 1, 1, 1} - for cnt, s := range data.Shape { - shape[cnt] = uint64(s) + shape := []uint64{0, 0, 0, 0} + for i := range data.Shape { + shape[i] = uint64(data.Shape[i]) } t := llm.Tensor{