arXiv:2507.20984cs.LGcs.AI2025-07被引 5

SmallThinker让大模型直接在本地设备运行,不依赖昂贵显卡。

SmallThinker: A Family of Efficient Large Language Models Natively Trained for Local Deployment

  • 从零设计适配本地设备,把算力弱、内存小、存储慢变成架构优势。
  • 用两级稀疏结构+预取路由,实现每秒20+词的推理速度,仅需1GB或8GB内存。
  • 适合想在手机、电脑上跑大模型的开发者和普通用户。

尽管前沿大语言模型持续拓展能力边界,其部署仍局限于配备GPU的云基础设施。我们提出SmallThinker,一个专为本地设备特性——计算能力弱、内存有限、存储缓慢——原生设计的LLM家族。不同于传统压缩云端模型的方法,SmallThinker从零构建,将限制转化为设计原则:第一,采用细粒度混合专家(MoE)与稀疏前馈网络结合的两级稀疏结构,显著降低计算需求而不牺牲模型容量;第二,设计预注意力路由机制,使协同推理引擎可在计算注意力时提前从存储预取专家参数,有效隐藏存储延迟;第三,采用NoPE-RoPE混合稀疏注意力机制,大幅减少键值缓存占用。我们发布SmallThinker-4B-A0.6B和SmallThinker-21B-A3B,性能达到业界领先水平,甚至超越更大模型。尤为关键的是,配合Q4_0量化后,两模型在普通消费级CPU上均实现超20 tokens/s的推理速度,内存占用仅为1GB和8GB。SmallThinker已公开于hf.co/PowerInfer/SmallThinker-4BA0.6B-Instruct和hf.co/PowerInfer/SmallThinker-21BA3B-Instruct。

原文摘要 · Abstract (English)

While frontier large language models (LLMs) continue to push capability boundaries, their deployment remains confined to GPU-powered cloud infrastructure. We challenge this paradigm with SmallThinker, a family of LLMs natively designed - not adapted - for the unique constraints of local devices: weak computational power, limited memory, and slow storage. Unlike traditional approaches that mainly compress existing models built for clouds, we architect SmallThinker from the ground up to thrive within these limitations. Our innovation lies in a deployment-aware architecture that transforms constraints into design principles. First, We introduce a two-level sparse structure combining fine-grained Mixture-of-Experts (MoE) with sparse feed-forward networks, drastically reducing computational demands without sacrificing model capacity. Second, to conquer the I/O bottleneck of slow storage, we design a pre-attention router that enables our co-designed inference engine to prefetch expert parameters from storage while computing attention, effectively hiding storage latency that would otherwise cripple on-device inference. Third, for memory efficiency, we utilize NoPE-RoPE hybrid sparse attention mechanism to slash KV cache requirements. We release SmallThinker-4B-A0.6B and SmallThinker-21B-A3B, which achieve state-of-the-art performance scores and even outperform larger LLMs. Remarkably, our co-designed system mostly eliminates the need for expensive GPU hardware: with Q4_0 quantization, both models exceed 20 tokens/s on ordinary consumer CPUs, while consuming only 1GB and 8GB of memory respectively. SmallThinker is publicly available at hf.co/PowerInfer/SmallThinker-4BA0.6B-Instruct and hf.co/PowerInfer/SmallThinker-21BA3B-Instruct.

大模型本地部署稀疏结构推理加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。