From bd93a94abdee7ceef24f13c529f2b04a6ea749fd Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Tue, 17 Oct 2023 15:35:16 -0400 Subject: [PATCH] fix MB VRAM log output (#824) --- llm/llama.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm/llama.go b/llm/llama.go index 0bd4076c..8aa0f300 100644 --- a/llm/llama.go +++ b/llm/llama.go @@ -249,7 +249,7 @@ func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int { // max number of layers we can fit in VRAM, subtract 8% to prevent consuming all available VRAM and running out of memory layers := int(freeBytes/bytesPerLayer) * 92 / 100 - log.Printf("%d MiB VRAM available, loading up to %d GPU layers", freeBytes, layers) + log.Printf("%d MB VRAM available, loading up to %d GPU layers", freeBytes/(1024*1024), layers) return layers }