Cambricon-LLM:一种基于小芯片的混合架构,用于70B LLM的设备端推理
Cambricon-LLM: A Chiplet-Based Hybrid Architecture for On-Device Inference of 70B LLM
AI总结:
本文提出Cambricon-LLM,一种结合NPU与NAND flash芯片的混合架构,通过硬件分块、片上计算与ECC技术优化数据移动,实现70B LLM在边缘设备上的高效推理,速度比现有技术提升22至45倍。
摘要:
在智能手机和机器人等边缘设备上部署先进的大型语言模型是一个日益增长的趋势,这能在保留智能能力的同时增强用户数据隐私和网络连接韧性。然而,该任务表现出单批次计算且算术强度极低的特点,这给有限的边缘资源带来了巨大的内存占用和带宽需求的重大挑战。为解决这些问题,我们引入了Cambricon-LLM,这是一种基于小芯片的混合架构,结合了NPU和专用的NAND flash芯片,以实现70B LLM的高效设备端推理。这种混合架构利用了NPU的高计算能力和NAND flash芯片的数据容量,并提出了硬件分块策略,最小化了NPU与NAND flash芯片之间的数据移动开销。具体而言,NAND flash芯片通过我们创新的flash内计算和片上ECC技术增强,擅长执行精确的轻量级片上处理。同时,NPU与flash芯片协作进行矩阵运算,并处理超出flash片上处理能力的特殊函数计算。总体而言,Cambricon-LLM实现了70B LLM以3.44 token/s的速度进行设备端推理,以及7B LLM以36.34 token/s的速度进行推理,比现有flash卸载技术快22倍至45倍以上,展示了在边缘设备中部署强大LLM的潜力。
英文摘要:
Deploying advanced large language models on edge devices, such as smartphones and robotics, is a growing trend that enhances user data privacy and network connectivity resilience while preserving intelligent capabilities. However, such a task exhibits single-batch computing with incredibly low arithmetic intensity, which poses the significant challenges of huge memory footprint and bandwidth demands on limited edge resources. To address these issues, we introduce Cambricon-LLM, a chiplet-based hybrid architecture with NPU and a dedicated NAND flash chip to enable efficient on-device inference of 70B LLMs. Such a hybrid architecture utilizes both the high computing capability of NPU and the data capacity of the NAND flash chip, with the proposed hardware-tiling strategy that minimizes the data movement overhead between NPU and NAND flash chip. Specifically, the NAND flash chip, enhanced by our innovative in-flash computing and on-die ECC techniques, excels at performing precise lightweight on-die processing. Simultaneously, the NPU collaborates with the flash chip for matrix operations and handles special function computations beyond the flash's on-die processing capabilities. Overall, Cambricon-LLM enables the on-device inference of 70B LLMs at a speed of 3.44 token/s, and 7B LLMs at a speed of 36.34 token/s, which is over 22X to 45X faster than existing flash-offloading technologies, showing the potentiality of deploying powerful LLMs in edge devices.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。