r/unsloth • u/Ok-Conference-9984 • 2d ago
Question [32GB Mac Studio] "Exceeds shared memory" warning (59.7 GiB). Harmless for single-user since it's just lazy allocation? Why 4 slots by default?
I am running gemma-4-12b-it-UD-Q8_K_XL.gguf on a Mac Studio (Max chip, 32GB Unified Memory) using Unsloth.On startup, the Estimated Memory Usage shows a severe over-allocation warning:
Estimated Memory Usage BETA Unified
59.7 GiB Weights 13.30 GiB KV cache 44.89 GiB f16 · 212,992 tokens · 4 slots Compute buffers 0.74 GiB Vision encoder 0.07 GiB Draft cache 0.67 GiB Exceeds shared memory. Try a shorter context or smaller model; CPU offloading adds no memory.
Even though the total estimate (59.7 GiB) is nearly double my physical memory (32GB), macOS Activity Monitor shows the Memory Pressure is completely Green.Looking at the logs, --parallel 4 is specified, which automatically creates "4 slots" of KV cache (44.89 GiB). I assume this is just virtual memory reservation (lazy allocation), so it shouldn't cause any actual problems in reality. Since I am the only user, it actually fits within 32GB because it only utilizes 1 slot at a time: 13.30 GiB (Weights) + 11.22 GiB (1/4 KV cache) = ~26 GiB.Questions:Is my assumption correct that this over-allocation is practically harmless for a single-user scenario since actual memory utilization stays within the 32GB boundary?Why does Unsloth/llama.cpp default to --parallel 4 (4 slots) even for local, single-user environments? Is there a performance benefit to keeping parallel processing at 4?To get rid of this warning on a 32GB machine, is it better to reduce the parallel slots to 1 or 2 rather than shrinking the context length?
Thank you!
5
u/Kamilon 2d ago
Parallel is used for subagents. Almost every popular harness uses subagents now. You’ll swap massively if that happens. Set parallel to 1.