Francesco Bonacci和Johnny Franks团队公布了一项研究成果,通过在macOS虚拟机中部署Metal能力兼容层,显著改善了大语言模型的推理效率 [1]。在M1 Ultra处理器上,TinyLlama 1.1B模型的提示词处理速度提升11.08倍,令牌生成速度提升16.36倍;Google Gemma 4 12B模型的对应性能分别提升7.20倍和14.54倍 [1]。
该技术在性能接近程度上表现突出 [1]。TinyLlama提示词处理达到裸机98%的性能水平,Gemma 4的提示词处理达到裸机性能的99.59%,生成速度达到94.82% [1]。具体数据显示,TinyLlama提示词处理速度从每秒432个令牌提升至4,787个令牌,Gemma 4提示词处理从71.66提升到515.76个令牌/秒,生成速度从3.41提升至49.67个令牌/秒 [1]。本次测试在配备48核GPU的M1 Ultra、macOS 26.6.1主机和Tahoe Cua映像(macOS 26.5.2)上进行,使用llama.cpp b10167版本和官方模型作为基准 [1]。该研究成果已在Lume和Cua项目下开源发布 [1]。
Francesco Bonacci and Johnny Franks have released research demonstrating significant performance improvements for large language model inference running on macOS virtual machines through Apple Silicon [1]. By implementing a Metal compatibility layer that unlocks newer GPU code paths, the team achieved substantial speedups across multiple models on the M1 Ultra processor [1].
Testing on TinyLlama 1.1B showed prompt processing speeds improve 11.08 times and token generation speeds increase 16.36 times, with absolute performance reaching 4,787 tokens per second for prompts compared to the previous 432 tokens per second [1]. For Google Gemma 4 12B, the gains were more modest but still substantial: prompt processing accelerated 7.20 times to 515.76 tokens per second from 71.66 tokens per second, while generation speeds jumped 14.54 times to 49.67 tokens per second from 3.41 tokens per second [1]. Performance relative to bare metal systems achieved near parity in several cases, with TinyLlama reaching 98 percent of native speeds on prompt processing and Gemma 4 reaching 99.59 percent for prompts and 94.82 percent for generation [1].
The research, conducted on an M1 Ultra with 48 GPU cores running macOS 26.6.1 as host with Tahoe Cua image (macOS 26.5.2), has been released as open source under the Lume and Cua projects [1]. Benchmarks used llama.cpp build version b10167 with official model weights [1].