"vscode:/vscode.git/clone" did not exist on "15b951d4c4d4a75cc30442d5dd72fb72ed110e09"
Unverified Commit 65fadddc authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #3964 from ollama/mxyng/weights

fix gemma, command-r layer weights
parents b1390a7b f81f3081
......@@ -102,10 +102,14 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
layers := ggml.Tensors().Layers()
var memoryLayerOutput uint64
for k, v := range layers {
if k == "output" || k == "output_norm" {
memoryLayerOutput += v.size()
}
if layer, ok := layers["output_norm"]; ok {
memoryLayerOutput += layer.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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment