arXiv:2512.03608cs.ARcs.AI2025-12被引 1

KVNAND让大模型在无DRAM的闪存上高效运行,突破长文本推理瓶颈。

KVNAND: Efficient On-Device Large Language Model Inference Using DRAM-Free In-Flash Computing

  • 将模型权重与键值缓存全存于3D NAND闪存,实现无DRAM设计。
  • 在128/1000/10000令牌上下文中分别提速1.98/1.94/2.05倍。
  • 适合资源受限设备上的长文本生成任务,尤其关注隐私与能效的场景。

将大语言模型部署于边缘设备可实现个性化代理,具备强隐私保护和低成本优势。然而,参数量达数十至数百亿的模型在单批次自回归推理时面临极低算术强度,导致权重加载与带宽压力严重。现有闪存计算(IFC)方案虽将解码阶段的权重计算与闪存共置以缓解瓶颈,但仍依赖DRAM存储键值(KV)缓存。随着上下文长度增长,KV缓存规模可能超过模型权重,带来高昂的DRAM成本与容量需求。尝试将KV缓存移至闪存会引发严重性能下降。本文提出KVNAND,首个完全无DRAM、基于IFC的架构,将模型权重与KV缓存全部存于可计算的3D NAND闪存中。通过全程采用IFC减少数据传输开销、引入头组并行提升吞吐量、页级缓存映射对齐访问模式,有效应对闪存密集访问下的性能挑战。此外,设计空间探索框架自动评估离散紧凑的KVNAND变体,优化权重与缓存布局,平衡性能与可靠性。实测表明,在MHA 7B与GQA 70B模型上,相比含DRAM的IFC方案,128/1000/10000令牌上下文中分别实现1.98×/1.94×/2.05×几何平均加速,并在10万令牌上下文下解决内存溢出问题。

原文摘要 · Abstract (English)

Deploying large language models (LLMs) on edge devices enables personalized agents with strong privacy and low cost. However, with tens to hundreds of billions of parameters, single-batch autoregressive inference suffers from extremely low arithmetic intensity, creating severe weight-loading and bandwidth pressures on resource-constrained platforms. Recent in-flash computing (IFC) solutions alleviate this bottleneck by co-locating weight-related linear computations in the decode phase with flash, yet still rely on DRAM for the key-value (KV) cache. As context length grows, the KV cache can exceed model weights in size, imposing prohibitive DRAM cost and capacity requirements. Attempts to offload KV cache to flash suffer from severe performance penalties. We propose KVNAND, the first DRAM-free, IFC-based architecture that stores both model weights and KV cache entirely in compute-enabled 3D NAND flash. KVNAND addresses the fundamental performance challenges of flash under intensive KV cache access by leveraging IFC for all memory-bound operations to reduce data transfer overhead, introducing head-group parallelism to boost throughput, and employing page-level KV cache mapping to align token access patterns with flash organization. In addition, we propose a design space exploration framework that evaluates discrete and compact KVNAND variants to balance weight and KV placement, automatically identifying the optimal design trade-off. These techniques mitigate latency, energy, and reliability concerns, turning flash into a practical medium for long-context KV storage. Evaluations on MHA 7B and GQA 70B LLMs show that KVNAND achieves 1.98\(\times\)/1.94\(\times\)/2.05\(\times\) geomean speedup at 128/1K/10K-token contexts compared to DRAM-equipped IFC designs and addresses out-of-memory failures at 100K context length.

边缘计算闪存计算大模型推理长上下文

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