MobileFineTuner:面向真实世界嵌入式AI应用中设备端大语言模型微调的移动原生框架
MobileFineTuner: A Mobile-Native Framework for On-Device LLM Fine-Tuning in Real-World Embedded AI Applications
AI总结:
提出移动原生框架MobileFineTuner,通过C++实现资源感知训练运行时(内存高效注意力、激活检查点等),在商用手机上实现端到端LLM微调,显著降低内存压力并提升可执行性。
摘要:
大语言模型(LLM)正从以云为中心的服务转向设备端嵌入式AI,其中模型与从用户及其物理环境感知的私有、纵向信号进行交互。手机是此类应用的自然平台,因为用户随身携带、连接可穿戴传感器,并深度集成于日常移动应用中。然而,在商用手机上实际进行LLM微调仍然困难。现有微调框架大多基于Python且面向服务器,难以部署到移动应用中。我们提出MobileFineTuner,一个面向移动原生的开源框架,用于在商用手机上实现端到端LLM微调。MobileFineTuner用C++实现,并提供可复用的训练栈。为了在移动资源约束下使微调可行,MobileFineTuner集成了资源感知的训练运行时,包括内存高效注意力、激活检查点、梯度累积、参数分片和能量感知调度。我们在真实手机上使用GPT-2、Gemma 3和Qwen2.5模型,在多个微调任务上评估MobileFineTuner。结果表明,MobileFineTuner再现了标准Full-FT和LoRA微调行为,显著降低了内存压力并提升了在内存受限手机上的可执行性。我们进一步通过一个私有的校园健康代理应用展示了MobileFineTuner,其中本地LLM在用户特定的可穿戴感知记录上进行微调,以提供更个性化的响应,同时将原始记录保留在手机上。这些结果确立了MobileFineTuner作为在嵌入式AI和感知系统中研究和构建设备端LLM微调应用的实用工具包。
英文摘要:
Large language models (LLMs) are moving from cloud-centric services toward on-device embedded AI, where models interact with private, longitudinal signals sensed from users and their physical environments. Mobile phones are a natural platform for such applications because they are continuously carried by users, connected to wearable sensors, and deeply integrated with daily mobile applications. However, practical LLM fine-tuning on commodity phones remains difficult. Existing fine-tuning frameworks are largely Python-based and server-oriented, making them hard to deploy inside mobile applications. We present MobileFineTuner, a mobile-native open-source framework for end-to-end LLM fine-tuning on commodity mobile phones. MobileFineTuner is implemented in C++ and provides a reusable training stack. To make fine-tuning feasible under mobile resource constraints, MobileFineTuner integrates a resource-aware training runtime with memory-efficient attention, activation checkpointing, gradient accumulation, parameter sharding, and energy-aware scheduling. We evaluate MobileFineTuner on real mobile phones using GPT-2, Gemma 3, and Qwen2.5 models across multiple fine-tuning tasks. The results show that MobileFineTuner reproduces standard Full-FT and LoRA fine-tuning behavior, substantially reduces memory pressure and improves executability on memory-constrained phones. We further demonstrate MobileFineTuner through a private campus health-agent application, where a local LLM is fine-tuned on user-specific wearable-sensing records to provide more personalized responses while keeping raw records on the phone. These results establish MobileFineTuner as a practical toolkit for studying and building on-device LLM fine-tuning applications in embedded AI and sensing systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。