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
90f071c6
Commit
90f071c6
authored
Apr 02, 2024
by
Michael Yang
Browse files
default head_kv to 1
parent
a039e383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
llm/ggml.go
llm/ggml.go
+6
-6
No files found.
llm/ggml.go
View file @
90f071c6
...
...
@@ -148,15 +148,15 @@ func (kv KV) HeadCount() uint64 {
}
func
(
kv
KV
)
HeadCountKV
()
uint64
{
return
kv
.
u64
(
fmt
.
Sprintf
(
"%s.attention.head_count_kv"
,
kv
.
Architecture
()))
if
headCountKV
:=
kv
.
u64
(
fmt
.
Sprintf
(
"%s.attention.head_count_kv"
,
kv
.
Architecture
()));
headCountKV
>
0
{
return
headCountKV
}
return
1
}
func
(
kv
KV
)
GQA
()
uint64
{
if
headCountKV
:=
kv
.
HeadCountKV
();
headCountKV
>
0
{
return
kv
.
HeadCount
()
/
headCountKV
}
return
0
return
kv
.
HeadCount
()
/
kv
.
HeadCountKV
()
}
func
(
kv
KV
)
EmbeddingLength
()
uint64
{
...
...
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