arXiv:2603.09046cs.CRcs.LG2026-03被引 1

FlexServe让手机端大模型推理又快又安全,支持灵活资源隔离。

FlexServe: A Fast and Secure LLM Serving System for Mobile Devices with Flexible Resource Isolation

  • 用灵活隔离机制实现内存与NPU的动态安全切换
  • 比基准方案快10倍以上,多模型任务快24倍
  • 适合对隐私和速度要求高的移动端大模型应用

设备端大语言模型(LLM)因更高隐私性和可用性而快速发展。推理过程中,模型权重和用户数据均具高价值,攻击者可能通过被攻陷的操作系统内核窃取信息。ARM TrustZone是移动设备上主流的硬件级隔离技术,用于保护敏感应用免受受损系统影响。然而,传统基于TrustZone的保护方式因内存和NPU隔离僵化,导致显著性能开销。为此,本文提出FlexServe,一种面向移动设备的快速且安全的LLM服务系统。其核心是灵活资源隔离机制,构建灵活安全内存(Flex-Mem)与灵活安全NPU(Flex-NPU),可高效切换内存页与NPU在非保护与保护模式间的状态。在此基础上,设计了基于TrustZone安全世界的快速安全推理框架,引入面向模型的内存管理与安全推理流水线以加速推理,并提出多模型调度器优化多模型工作流。我们实现了一个原型系统,对比两种基于TrustZone的基线设计。结果表明,相比基线方案,FlexServe在首次词元时间(TTFT)上平均提升10.05倍;相比启用流水线与安全NPU的优化基线,平均提升2.44倍。对于多模型智能体工作流,端到端速度提升最高达24.30倍与4.05倍。

原文摘要 · Abstract (English)

Device-side Large Language Models (LLMs) have witnessed explosive growth, offering higher privacy and availability compared to cloud-side LLMs. During LLM inference, both model weights and user data are valuable, and attackers may even compromise the OS kernel to steal them. ARM TrustZone is the de facto hardware-based isolation technology on mobile devices, used to protect sensitive applications from a compromised OS. However, protecting LLM inference with TrustZone incurs significant overhead due to its inflexible isolation of memory and the NPU. To address these challenges, this paper introduces FlexServe, a fast and secure LLM serving system for mobile devices. It first introduces a Flexible Resource Isolation mechanism to construct Flexible Secure Memory (Flex-Mem) and Flexible Secure NPU (Flex-NPU). Both memory pages and the NPU can be efficiently switched between unprotected and protected modes. Based on these mechanisms, FlexServe designs a fast and secure LLM inference framework within TrustZone's secure world. The LLM-Aware Memory Management and Secure Inference Pipeline are introduced to accelerate inference. A Multi-Model Scheduler is proposed to optimize multi-model workflows. We implement a prototype of FlexServe and compare it with two TrustZone-based strawman designs. The results show that FlexServe achieves an average $10.05\times$ speedup in Time to First Token (TTFT) compared to the strawman, and an average $2.44\times$ TTFT speedup compared to an optimized strawman with pipeline and secure NPU enabled. For multi-model agent workflows, the end-to-end speedup is up to $24.30\times$ and $4.05\times$ compared to the strawman and optimized strawman, respectively.

大模型推理移动端安全隔离TrustZone

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