The growing adoption of Apple Silicon for machine learning development has created demand for efficient inference solutions that leverage its unique unified memory architecture. However, existing tools either lack native optimization (PyTorch MPS) or focus solely on text models, leaving multimodal workloads underserved. We present vllm-mlx, a framework for efficient LLM and MLLM inference on Apple Silicon built natively on MLX. For text models, we achieve 21\% to 87\% higher throughput than llama-cpp across models ranging from Qwen3-0.6B to Nemotron-30B, while providing continuous batching that scales to 4.3x aggregate throughput at 16 concurrent requests. For multimodal models, we introduce content-based prefix caching that eliminates redundant vision encoding by identifying identical images through content hashing, regardless of input format. Our evaluation on Apple M4 Max demonstrates throughput of up to 525 tokens per second on text models and 28x speedup on repeated image queries, reducing multimodal latency from 21.7 seconds to under 1 second. Video analysis with up to 64 frames achieves 24.7x cache speedup. We release our implementation as open source to support efficient inference on consumer Apple hardware.


翻译:苹果芯片在机器学习开发领域的日益普及,催生了对其独特统一内存架构进行高效推理解决方案的需求。然而,现有工具要么缺乏原生优化(如 PyTorch MPS),要么仅专注于文本模型,导致多模态工作负载未能得到充分支持。我们提出了 vllm-mlx,这是一个基于 MLX 原生构建、专为苹果芯片高效运行大语言模型和多模态大语言模型推理而设计的框架。对于文本模型,在从 Qwen3-0.6B 到 Nemotron-30B 的多个模型上,我们实现了比 llama-cpp 高出 21% 至 87% 的吞吐量,同时提供了连续批处理功能,在 16 个并发请求下可将聚合吞吐量提升至 4.3 倍。对于多模态模型,我们引入了基于内容的前缀缓存技术,该技术通过内容哈希识别相同图像(无论输入格式如何),从而消除了冗余的视觉编码。我们在苹果 M4 Max 上的评估表明,文本模型的吞吐量最高可达每秒 525 个 token,在重复图像查询上实现了 28 倍的加速,将多模态延迟从 21.7 秒降低到 1 秒以内。对多达 64 帧的视频分析实现了 24.7 倍的缓存加速。我们将实现代码开源发布,以支持在消费级苹果硬件上进行高效推理。

0
下载
关闭预览

相关内容

从感知到推理:深度思考赋能多模态大语言模型
专知会员服务
24+阅读 · 2025年11月19日
大语言模型推理系统综述
专知会员服务
30+阅读 · 2025年7月1日
大语言模型在多模态推荐系统中的应用综述
专知会员服务
17+阅读 · 2025年5月17日
强化多模态大语言模型:基于强化学习的推理综述
专知会员服务
35+阅读 · 2025年5月3日
《多模态大语言模型评估综述》
专知会员服务
39+阅读 · 2024年8月29日
《高效多模态大型语言模型》综述
专知会员服务
73+阅读 · 2024年5月20日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
VIP会员
相关VIP内容
从感知到推理:深度思考赋能多模态大语言模型
专知会员服务
24+阅读 · 2025年11月19日
大语言模型推理系统综述
专知会员服务
30+阅读 · 2025年7月1日
大语言模型在多模态推荐系统中的应用综述
专知会员服务
17+阅读 · 2025年5月17日
强化多模态大语言模型:基于强化学习的推理综述
专知会员服务
35+阅读 · 2025年5月3日
《多模态大语言模型评估综述》
专知会员服务
39+阅读 · 2024年8月29日
《高效多模态大型语言模型》综述
专知会员服务
73+阅读 · 2024年5月20日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员