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
21adf8b6
Unverified
Commit
21adf8b6
authored
Jun 18, 2024
by
Michael Yang
Committed by
GitHub
Jun 18, 2024
Browse files
Merge pull request #5121 from ollama/mxyng/deepseekv2
deepseek v2 graph
parents
26d0bf92
e873841c
Changes
1
Hide 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 @
21adf8b6
...
...
@@ -367,6 +367,17 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
4
*
batch
*
(
vocab
+
2
*
embedding
),
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
...
...
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