边缘部署的小语言模型:CPU、GPU和NPU后端的综合比较
Edge Deployment of Small Language Models, a comprehensive comparison of CPU, GPU and NPU backends
AI总结:
本研究比较了CPU、GPU和NPU在边缘部署小语言模型的性能和能效,发现NPU在性能和能效上表现最佳。
摘要:
边缘计算在数据生成的地方处理数据,从而实现更快的决策、更低的带宽使用和改进的隐私保护。然而,边缘设备通常在处理能力、内存和能耗方面受到严格限制,使其不适合大型语言模型(LLMs)。幸运的是,小型语言模型(SLMs)提供了轻量级的替代方案,通过显著降低计算成本,将AI推理带入资源受限的环境,同时仍适合专门化和定制化。在这一场景中,选择最适合平衡性能和效率的硬件平台进行SLM推理具有挑战性,因为存在严格的资源限制。为了解决这一问题,本研究评估了商业CPU(Intel和ARM)、GPU(NVIDIA)和NPU(RaiderChip)在运行SLM时的推理性能和能效。GPU通常是首选平台,但与商业NPU和最近的多核CPU进行比较。尽管NPU利用定制硬件设计进行优化计算,现代CPU越来越多地集成了针对语言模型工作负载的专用功能。使用通用执行框架和一组最先进的SLM,我们分析了每个平台可用的商业解决方案在最大可实现性能和处理和能效方面的表现。结果表明,专用后端优于通用CPU,NPU在性能上领先幅度较大。带宽归一化对公平的跨架构比较至关重要。虽然低功耗ARM处理器在考虑能耗时表现具有竞争力,但结合性能和功率的指标(如EDP)再次突显NPU为主导架构。这些发现表明,同时优化效率和性能的设计在边缘工作负载中具有明显优势。
英文摘要:
Edge computing processes data where it is generated, enabling faster decisions, lower bandwidth usage, and improved privacy. However, edge devices typically operate under strict constraints on processing power, memory, and energy consumption, making them unsuitable for large language models (LLMs). Fortunately, Small Language Models (SLMs) offer lightweight alternatives that bring AI inference to resource-constrained environments by significantly reducing computational cost while remaining suitable for specialization and customization. In this scenario, selecting the hardware platform that best balances performance and efficiency for SLM inference is challenging due to strict resource limitations. To address this issue, this study evaluates the inference performance and energy efficiency of commercial CPUs (Intel and ARM), GPUs (NVIDIA), and NPUs (RaiderChip) for running SLMs. GPUs, the usual platform of choice, are compared against commercial NPUs and recent multi-core CPUs. While NPUs leverage custom hardware designs optimized for computation, modern CPUs increasingly incorporate dedicated features targeting language-model workloads. Using a common execution framework and a suite of state-of-the-art SLMs, we analyze both maximum achievable performance and processing and energy efficiency across commercial solutions available for each platform. The results indicate that specialized backends outperform general-purpose CPUs, with NPUs achieving the highest performance by a wide margin. Bandwidth normalization proves essential for fair cross-architecture comparisons. Although low-power ARM processors deliver competitive results when energy usage is considered, metrics that combine performance and power (such as EDP) again highlight NPUs as the dominant architecture. These findings show that designs optimized for both efficiency and performance offer a clear advantage for edge workloads.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。