Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
5a5dca13
Commit
5a5dca13
authored
Nov 29, 2023
by
Michael Yang
Browse files
comments
parent
72e7a49a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
llm/gguf.go
llm/gguf.go
+3
-4
No files found.
llm/gguf.go
View file @
5a5dca13
...
...
@@ -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
}
...
...
@@ -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
)
}
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment