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
e873841c
Commit
e873841c
authored
Jun 18, 2024
by
Michael Yang
Browse files
deepseek v2 graph
parent
26d0bf92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
llm/ggml.go
llm/ggml.go
+11
-0
No files found.
llm/ggml.go
View file @
e873841c
...
@@ -367,6 +367,17 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
...
@@ -367,6 +367,17 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
4
*
batch
*
(
vocab
+
2
*
embedding
),
4
*
batch
*
(
vocab
+
2
*
embedding
),
fullOffload
,
fullOffload
,
)
)
case
"deepseek2"
:
keys
:=
uint64
(
llm
.
KV
()[
"deepseek2.attention.key_length"
]
.
(
uint32
))
fullOffload
=
max
(
4
*
batch
*
(
3
*
embedding
+
vocab
),
4
*
batch
*
(
3
*
embedding
+
2
+
context
*
(
1
+
headsKV
)
+
2
*
keys
*
headsKV
),
)
partialOffload
=
max
(
4
*
batch
*
(
3
*
embedding
+
vocab
)
+
embedding
*
vocab
*
105
/
128
,
4
*
batch
*
(
2
*
embedding
+
1
+
2
*
keys
*
headsKV
+
context
+
context
*
headsKV
)
+
4
*
keys
*
context
*
headsKV
+
embedding
*
keys
*
headsKV
*
9
/
16
,
)
}
}
return
return
...
...
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