arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.06485cs.CLcs.AI
收藏

Litespark Inference For CPUs: 三元(1.58位)语言模型的超快SIMD框架

Litespark Inference For CPUs: Ultra-Fast SIMD Framework for Ternary (1.58-bit) Language Models

Mindbeam AI

Nii Osae Osae Dade, Tony Morri, Moinul Hossain Rahat, Sayandip Pal, Rickston Pinto

AI总结:

针对三元语言模型权重为{-1,0,1}的特点,提出自定义SIMD内核,用加减运算替代矩阵乘法,在CPU上实现18-96倍加速和6倍内存减少。

摘要:

大型语言模型(LLM)已经改变了人工智能,但其计算需求对大多数用户来说仍然过高。标准推理需要昂贵的数据中心GPU或云API访问,导致超过十亿台个人计算机在AI工作负载中未被充分利用。三元模型提供了一条前进的道路:它们的权重被限制在{-1, 0, +1},理论上消除了浮点乘法的需求。然而,现有框架未能利用这种结构,将三元模型视为密集浮点网络。我们通过自定义SIMD内核填补了这一空白,这些内核用简单的加法和减法运算取代矩阵乘法,针对现代CPU上可用的整数点积指令。我们的实现Litespark-Inference可通过pip安装,并直接与Hugging Face集成,在Apple Silicon上实现了比标准PyTorch推理高18.15倍的吞吐量、快7.15倍的首令牌时间和6.03倍的内存减少,在Intel和AMD处理器上实现了高达95.81倍的吞吐量加速。

英文摘要:

Large language models (LLMs) have transformed artificial intelligence, but their computational requirements remain prohibitive for most users. Standard inference demands expensive datacenter GPUs or cloud API access, leaving over one billion personal computers underutilized for AI workloads. Ternary models offer a path forward: their weights are constrained to {-1, 0, +1}, theoretically eliminating the need for floating-point multiplication. However, existing frameworks fail to exploit this structure, treating ternary models as dense floating-point networks. We address this gap with custom SIMD kernels that replace matrix multiplication with simple addition and subtraction operations, targeting the integer dot product instructions available on modern CPUs. Our implementation, Litespark-Inference, is pip-installable and integrates directly with Hugging-Face, achieving 18.15x higher throughput, 7.15x faster time-to-first-token and 6.03x memory reduction compared to standard PyTorch inference on Apple Silicon, with comparable or higher throughput speedups up to 95.81x on Intel and AMD processors.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑