diff --git a/cmd/gguf-parser/README.md b/cmd/gguf-parser/README.md index a1f38f3..11173e2 100644 --- a/cmd/gguf-parser/README.md +++ b/cmd/gguf-parser/README.md @@ -224,6 +224,8 @@ $ gguf-parser --repo="NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO-GGUF" --file=" + + + + + +----------------+ +------------+-------------+ | | | | | | 25 | | 5.91 GiB | 21.42 GiB | + + + + + +----------------+ +------------+-------------+ +| | | | | | 30 | | 2.04 GiB | 25.29 GiB | ++ + + + + +----------------+ +------------+-------------+ | | | | | | 32 | | 395.24 MiB | 26.94 GiB | +----------+-------+--------------+-----------------+--------------+----------------+-----------+------------+-------------+ diff --git a/cmd/gguf-parser/main.go b/cmd/gguf-parser/main.go index cca74ea..56eec52 100644 --- a/cmd/gguf-parser/main.go +++ b/cmd/gguf-parser/main.go @@ -229,7 +229,11 @@ func main() { offloadLayersStep = e.OffloadLayers } if offloadLayersStep < e.OffloadLayers { - ess := make([]LLaMACppUsageEstimateMemorySummary, e.OffloadLayers/offloadLayersStep+1) + cnt := e.OffloadLayers/offloadLayersStep + 1 + if e.OffloadLayers%offloadLayersStep != 0 { + cnt++ + } + ess := make([]LLaMACppUsageEstimateMemorySummary, cnt) var wg sync.WaitGroup for i := 0; i < cap(ess); i++ { wg.Add(1) @@ -317,7 +321,11 @@ func main() { offloadLayersStep = e.OffloadLayers } if offloadLayersStep < e.OffloadLayers { - ess := make([]LLaMACppUsageEstimateMemorySummary, e.OffloadLayers/offloadLayersStep+1) + cnt := e.OffloadLayers/offloadLayersStep + 1 + if e.OffloadLayers%offloadLayersStep != 0 { + cnt++ + } + ess := make([]LLaMACppUsageEstimateMemorySummary, cnt) var wg sync.WaitGroup for i := 0; i < cap(ess); i++ { wg.Add(1)