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
1eb382da
Commit
1eb382da
authored
May 10, 2024
by
Michael Yang
Browse files
add phi2 mem
parent
bb6fd022
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
llm/ggml.go
llm/ggml.go
+4
-1
No files found.
llm/ggml.go
View file @
1eb382da
...
...
@@ -329,7 +329,10 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
4
*
batch
*
(
1
+
4
*
embedding
+
context
+
context
*
heads
),
)
partialOffload
=
4
*
batch
*
(
2
*
embedding
+
vocab
)
+
embedding
*
vocab
*
105
/
128
partialOffload
=
max
(
4
*
batch
*
(
2
*
embedding
+
vocab
)
+
embedding
*
vocab
*
105
/
128
,
4
*
batch
*
(
2
+
3
*
embedding
+
context
+
context
*
heads
),
)
case
"stablelm"
:
fullOffload
=
4
*
batch
*
(
context
*
(
1
+
heads
)
+
3
*
embedding
+
2
)
partialOffload
=
max
(
...
...
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