用内存存储知识替代计算,让手机端大模型更快更准
MeKi: Memory-based Expert Knowledge Injection for Efficient LLM Scaling
- 用分层记忆专家注入预存语义知识,不靠算力提升性能
- 将训练参数转为紧凑查表,推理零延迟开销
- 适合资源受限的移动端部署,兼顾速度与准确率
扩展大语言模型(LLM)通常依赖增加参数量或测试时计算量来提升性能,但这些方法在边缘设备上因内存和NPU资源有限而不可行。尽管存在硬件限制,将高性能LLM部署到手机等设备对用户体验仍至关重要。为此,我们提出MeKi(基于内存的专家知识注入),一种通过存储空间而非浮点运算(FLOPs)扩展模型容量的新系统。MeKi在每个Transformer层中引入分词级记忆专家,将预先存储的语义知识注入生成过程。为弥合训练容量与推理效率之间的差距,我们采用重参数化策略,将训练中使用的参数矩阵折叠为紧凑的静态查找表。通过将知识卸载至ROM,MeKi实现了模型容量与计算成本的解耦,带来零推理延迟开销。大量实验表明,MeKi在相同推理速度下显著优于密集型LLM基线,验证了基于内存扩展范式在设备端大模型中的有效性。项目主页见https://github.com/ningding-o/MeKi。
原文摘要 · Abstract (English)
Scaling Large Language Models (LLMs) typically relies on increasing the number of parameters or test-time computations to boost performance. However, these strategies are impractical for edge device deployment due to limited RAM and NPU resources. Despite hardware constraints, deploying performant LLM on edge devices such as smartphone remains crucial for user experience. To address this, we propose MeKi (Memory-based Expert Knowledge Injection), a novel system that scales LLM capacity via storage space rather than FLOPs. MeKi equips each Transformer layer with token-level memory experts that injects pre-stored semantic knowledge into the generation process. To bridge the gap between training capacity and inference efficiency, we employ a re-parameterization strategy to fold parameter matrices used during training into a compact static lookup table. By offloading the knowledge to ROM, MeKi decouples model capacity from computational cost, introducing zero inference latency overhead. Extensive experiments demonstrate that MeKi significantly outperforms dense LLM baselines with identical inference speed, validating the effectiveness of memory-based scaling paradigm for on-device LLMs. Project homepage is at https://github.com/ningding-o/MeKi.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。