Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed Dec 5, 2023
1 parent 72e7a49 commit 5a5dca1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions llm/gguf.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ func (llm *ggufModel) NumKV() uint64 {
}

func (llm *ggufModel) ModelFamily() string {
t, ok := llm.kv["general.architecture"].(string)
if ok {
if t, ok := llm.kv["general.architecture"].(string); ok {
return t
}

Expand Down Expand Up @@ -146,8 +145,7 @@ func (llm *ggufModel) ModelType() string {
}

func (llm *ggufModel) FileType() string {
t, ok := llm.kv["general.file_type"].(uint32)
if ok {
if t, ok := llm.kv["general.file_type"].(uint32); ok {
return fileType(t)
}

Expand Down Expand Up @@ -216,6 +214,7 @@ func (llm *ggufModel) Decode(rso *readSeekOffset) error {
return err
}

// dims is the number of dimensions in the tensor
dims := llm.readU32(rso)

shape := [4]uint64{1, 1, 1, 1}
Expand Down

0 comments on commit 5a5dca1

Please sign in to comment.