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
811c3d19
Commit
811c3d19
authored
Oct 13, 2023
by
Michael Yang
Browse files
no gpu if vram < 2GB
parent
d890890f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
llm/llama.go
llm/llama.go
+5
-0
No files found.
llm/llama.go
View file @
811c3d19
...
@@ -215,6 +215,11 @@ func CheckVRAM() (int64, error) {
...
@@ -215,6 +215,11 @@ func CheckVRAM() (int64, error) {
free
+=
vram
free
+=
vram
}
}
if
free
*
1024
*
1024
<
2
*
1000
*
1000
*
1000
{
log
.
Printf
(
"less than 2 GB VRAM available, falling back to CPU only"
)
free
=
0
}
return
free
,
nil
return
free
,
nil
}
}
...
...
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