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
bd93a94a
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "77103d71ca0ee1233de082987e21f83f7f4c3a07"
Unverified
Commit
bd93a94a
authored
Oct 17, 2023
by
Bruce MacDonald
Committed by
GitHub
Oct 17, 2023
Browse files
fix MB VRAM log output (#824)
parent
f55bdb6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
llm/llama.go
llm/llama.go
+1
-1
No files found.
llm/llama.go
View file @
bd93a94a
...
@@ -249,7 +249,7 @@ func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
...
@@ -249,7 +249,7 @@ func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
// max number of layers we can fit in VRAM, subtract 8% to prevent consuming all available VRAM and running out of memory
// max number of layers we can fit in VRAM, subtract 8% to prevent consuming all available VRAM and running out of memory
layers
:=
int
(
freeBytes
/
bytesPerLayer
)
*
92
/
100
layers
:=
int
(
freeBytes
/
bytesPerLayer
)
*
92
/
100
log
.
Printf
(
"%d M
i
B VRAM available, loading up to %d GPU layers"
,
freeBytes
,
layers
)
log
.
Printf
(
"%d MB VRAM available, loading up to %d GPU layers"
,
freeBytes
/
(
1024
*
1024
)
,
layers
)
return
layers
return
layers
}
}
...
...
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