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
f81f3081
Commit
f81f3081
authored
Apr 26, 2024
by
Michael Yang
Browse files
fix gemma, command-r layer weights
parent
7fea1ecd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
llm/memory.go
llm/memory.go
+8
-4
No files found.
llm/memory.go
View file @
f81f3081
...
@@ -102,10 +102,14 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
...
@@ -102,10 +102,14 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
layers
:=
ggml
.
Tensors
()
.
Layers
()
layers
:=
ggml
.
Tensors
()
.
Layers
()
var
memoryLayerOutput
uint64
var
memoryLayerOutput
uint64
for
k
,
v
:=
range
layers
{
if
layer
,
ok
:=
layers
[
"output_norm"
];
ok
{
if
k
==
"output"
||
k
==
"output_norm"
{
memoryLayerOutput
+=
layer
.
size
()
memoryLayerOutput
+=
v
.
size
()
}
}
if
layer
,
ok
:=
layers
[
"output"
];
ok
{
memoryLayerOutput
+=
layer
.
size
()
}
else
if
layer
,
ok
:=
layers
[
"token_embd"
];
ok
{
memoryLayerOutput
+=
layer
.
size
()
}
}
if
gpus
[
0
]
.
Library
==
"metal"
&&
opts
.
UseMMap
{
if
gpus
[
0
]
.
Library
==
"metal"
&&
opts
.
UseMMap
{
...
...
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