arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.09046cs.CRcs.LGcs.OS
收藏

FlexServe: 一种适用于移动设备的高效且安全的LLM服务系统,具有灵活的资源隔离

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

Institute of Parallel and Distributed Systems(并行与分布式系统研究所)

Yinpeng Wu, Yitong Chen, Lixiang Wang, Jinyu Gu, Zhichao Hua, Yubin Xia

AI总结:

本文提出FlexServe,一种适用于移动设备的高效且安全的LLM服务系统,通过灵活的资源隔离机制提升推理速度和安全性,采用多模型调度器优化多模型工作流,实验显示在TTFT和多模型工作流中均取得显著加速效果。

摘要:

移动设备上的大语言模型(LLM)相比云侧LLM在隐私和可用性方面具有优势,但在LLM推理过程中,模型权重和用户数据都可能被攻击者窃取。ARM TrustZone是移动设备上事实上的硬件隔离技术,用于保护敏感应用免受被篡改的操作系统攻击。然而,使用TrustZone保护LLM推理会由于其对内存和NPU的僵化隔离带来显著开销。为了解决这些挑战,本文介绍了FlexServe,一种适用于移动设备的快速且安全的LLM服务系统。它首先引入了灵活的资源隔离机制,构建了灵活的安全内存(Flex-Mem)和灵活的安全NPU(Flex-NPU)。内存页面和NPU可以高效地在未受保护和受保护模式之间切换。基于这些机制,FlexServe设计了一个在TrustZone安全世界内的快速且安全的LLM推理框架。引入了LLM感知的内存管理和安全推理流水线以加速推理。提出了一种多模型调度器以优化多模型工作流。我们实现了一个FlexServe的原型,并将其与两个基于TrustZone的 strawman 设计进行比较。实验结果表明,与strawman相比,FlexServe在时间到第一个token(TTFT)上平均实现了10.05倍的加速,与具有流水线和安全NPU优化的strawman相比,TTFT平均加速了2.44倍。对于多模型代理工作流,端到端加速可达24.30倍和4.05倍,分别相比strawman和优化的strawman。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑