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
d835368e
Unverified
Commit
d835368e
authored
Jul 22, 2024
by
Jeffrey Morgan
Committed by
GitHub
Jul 22, 2024
Browse files
convert: capture `head_dim` for mistral (#5818)
parent
5784c053
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
convert/mistral.go
convert/mistral.go
+5
-0
No files found.
convert/mistral.go
View file @
d835368e
...
@@ -71,6 +71,11 @@ func (m *MistralModel) WriteGGUF(ws io.WriteSeeker) error {
...
@@ -71,6 +71,11 @@ func (m *MistralModel) WriteGGUF(ws io.WriteSeeker) error {
"tokenizer.ggml.unknown_token_id"
:
uint32
(
0
),
"tokenizer.ggml.unknown_token_id"
:
uint32
(
0
),
}
}
if
m
.
Params
.
HeadDimension
>
0
{
kv
[
"llama.attention.key_length"
]
=
uint32
(
m
.
Params
.
HeadDimension
)
kv
[
"llama.attention.value_length"
]
=
uint32
(
m
.
Params
.
HeadDimension
)
}
return
llm
.
NewGGUFV3
(
m
.
Params
.
ByteOrder
)
.
Encode
(
ws
,
kv
,
m
.
Tensors
)
return
llm
.
NewGGUFV3
(
m
.
Params
.
ByteOrder
)
.
Encode
(
ws
,
kv
,
m
.
Tensors
)
}
}
...
...
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