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
c0285158
You need to sign in or sign up before continuing.
Commit
c0285158
authored
Jan 03, 2024
by
Jeffrey Morgan
Browse files
tweak memory requirements error text
parent
77a66df7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
llm/llm.go
llm/llm.go
+2
-2
No files found.
llm/llm.go
View file @
c0285158
...
@@ -63,9 +63,9 @@ func New(workDir, model string, adapters, projectors []string, opts api.Options)
...
@@ -63,9 +63,9 @@ func New(workDir, model string, adapters, projectors []string, opts api.Options)
systemMemory
:=
int64
(
memory
.
TotalMemory
())
systemMemory
:=
int64
(
memory
.
TotalMemory
())
if
ggml
.
FileType
()
==
"F16"
&&
requiredMemory
*
f16Multiplier
>
systemMemory
{
if
ggml
.
FileType
()
==
"F16"
&&
requiredMemory
*
f16Multiplier
>
systemMemory
{
return
nil
,
fmt
.
Errorf
(
"F16 model requires at least %s of
total
memory"
,
format
.
HumanBytes
(
requiredMemory
))
return
nil
,
fmt
.
Errorf
(
"F16 model requires at least %s of memory"
,
format
.
HumanBytes
(
requiredMemory
))
}
else
if
requiredMemory
>
systemMemory
{
}
else
if
requiredMemory
>
systemMemory
{
return
nil
,
fmt
.
Errorf
(
"model requires at least %s of
total
memory"
,
format
.
HumanBytes
(
requiredMemory
))
return
nil
,
fmt
.
Errorf
(
"model requires at least %s of memory"
,
format
.
HumanBytes
(
requiredMemory
))
}
}
}
}
...
...
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