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
d06bc0cb
Unverified
Commit
d06bc0cb
authored
Oct 05, 2023
by
Bruce MacDonald
Committed by
GitHub
Oct 05, 2023
Browse files
enable q8, q5, 5_1, and f32 for linux gpu (#699)
parent
d104b7e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
llm/llm.go
llm/llm.go
+17
-14
No files found.
llm/llm.go
View file @
d06bc0cb
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"fmt"
"fmt"
"log"
"log"
"os"
"os"
"runtime"
"github.com/pbnjay/memory"
"github.com/pbnjay/memory"
...
@@ -37,6 +38,7 @@ func New(workDir, model string, adapters []string, opts api.Options) (LLM, error
...
@@ -37,6 +38,7 @@ func New(workDir, model string, adapters []string, opts api.Options) (LLM, error
return
nil
,
err
return
nil
,
err
}
}
if
runtime
.
GOOS
==
"darwin"
{
switch
ggml
.
FileType
()
{
switch
ggml
.
FileType
()
{
case
"Q8_0"
:
case
"Q8_0"
:
if
ggml
.
Name
()
!=
"gguf"
&&
opts
.
NumGPU
!=
0
{
if
ggml
.
Name
()
!=
"gguf"
&&
opts
.
NumGPU
!=
0
{
...
@@ -53,6 +55,7 @@ func New(workDir, model string, adapters []string, opts api.Options) (LLM, error
...
@@ -53,6 +55,7 @@ func New(workDir, model string, adapters []string, opts api.Options) (LLM, error
opts
.
NumGPU
=
0
opts
.
NumGPU
=
0
}
}
}
}
}
totalResidentMemory
:=
memory
.
TotalMemory
()
totalResidentMemory
:=
memory
.
TotalMemory
()
switch
ggml
.
ModelType
()
{
switch
ggml
.
ModelType
()
{
...
...
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