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
26df6747
"vscode:/vscode.git/clone" did not exist on "07dc8fb6662ea052680fb1b35751f51d73cefb08"
Commit
26df6747
authored
Apr 16, 2024
by
Michael Yang
Browse files
scale graph based on gpu count
parent
7c9792a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
gpu/gpu_darwin.go
gpu/gpu_darwin.go
+1
-1
llm/server.go
llm/server.go
+3
-0
No files found.
gpu/gpu_darwin.go
View file @
26df6747
...
@@ -55,6 +55,6 @@ func getCPUMem() (memInfo, error) {
...
@@ -55,6 +55,6 @@ func getCPUMem() (memInfo, error) {
return
memInfo
{
return
memInfo
{
TotalMemory
:
uint64
(
C
.
getPhysicalMemory
()),
TotalMemory
:
uint64
(
C
.
getPhysicalMemory
()),
FreeMemory
:
0
,
FreeMemory
:
0
,
DeviceCount
:
0
,
DeviceCount
:
1
,
},
nil
},
nil
}
}
llm/server.go
View file @
26df6747
...
@@ -79,6 +79,9 @@ func NewLlamaServer(model string, adapters, projectors []string, opts api.Option
...
@@ -79,6 +79,9 @@ func NewLlamaServer(model string, adapters, projectors []string, opts api.Option
graphFullOffload
=
graphPartialOffload
graphFullOffload
=
graphPartialOffload
}
}
graphFullOffload
*=
uint64
(
info
.
DeviceCount
)
graphPartialOffload
*=
uint64
(
info
.
DeviceCount
)
// memoryRequiredTotal represents the memory required for full GPU offloading (all layers)
// memoryRequiredTotal represents the memory required for full GPU offloading (all layers)
memoryRequiredTotal
:=
memoryMinimum
+
graphFullOffload
memoryRequiredTotal
:=
memoryMinimum
+
graphFullOffload
...
...
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