Apple Silicon and macOS VMs: Faster LLM Inference with llama.cpp
- AI
- Infrastructure
- Developer Tools
- Hardware
- Open Source
The post claims 11x faster prompt processing and 16x faster token generation for llama.cpp in a macOS VM on Apple Silicon. The mechanism is not a new universal optimization in llama.cpp. It is a workaround for how Apple’s Virtualization.framework guest presents the virtual GPU to Metal. In the stock VM, the guest reports an older Apple GPU family and a 32 KB threadgroup memory limit, so llama.cpp picks slower kernels. The authors inject a process-scoped layer at the Metal API boundary that reports newer capabilities instead, which lets llama.cpp choose faster code paths that the paravirtual GPU apparently handles just fine.
If you run local LLM workloads inside macOS VMs, check whether the guest is advertising an older Metal GPU family or smaller threadgroup memory than the host can actually support. For everyone else, treat the headline as a virtualization compatibility story, not a general llama.cpp performance jump on Apple Silicon.
-
github.com
- Discuss on HN