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
f921e269
Commit
f921e269
authored
Jan 09, 2024
by
Michael Yang
Browse files
typo
parent
4a33cede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
llm/llm.go
llm/llm.go
+1
-1
No files found.
llm/llm.go
View file @
f921e269
...
...
@@ -61,7 +61,7 @@ func New(workDir, model string, adapters, projectors []string, opts api.Options)
requiredKv
:=
2
*
2
*
int64
(
opts
.
NumCtx
)
*
int64
(
ggml
.
NumLayers
())
*
int64
(
ggml
.
NumEmbed
())
*
int64
(
ggml
.
NumHeadKv
())
/
int64
(
ggml
.
NumHead
())
// this amount is the overhead + tensors in memory
// TODO: get this from the llama.cpp's graph calc
l
uations instead of
// TODO: get this from the llama.cpp's graph calcu
l
ations instead of
// estimating it's 1/6 * kv_cache_size * num_gqa
requiredAlloc
:=
int64
(
ggml
.
NumGQA
())
*
requiredKv
/
6
...
...
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