让手机直接训练大模型,保护隐私还能个性化。
MobileFineTuner: A Mobile-Native Framework for On-Device LLM Fine-Tuning in Real-World Embedded AI Applications
- 用C++实现的移动端原生训练框架,支持端侧全流程微调。
- 在内存受限手机上运行GPT-2/Gemma 3/Qwen2.5,显存占用降低60%以上。
- 适合开发私密健康、智能穿戴等嵌入式AI应用,数据不离机。
大型语言模型(LLMs)正从云端服务转向设备端嵌入式AI,与用户及其物理环境的私密、长期信号交互。手机因其随身携带、连接可穿戴设备和深度集成日常应用,成为理想平台。然而,现有微调框架多基于Python且面向服务器,难以部署于移动应用。我们提出MobileFineTuner,一个开源的移动端原生框架,支持在普通手机上端到端微调大模型。该框架采用C++实现,提供可复用的训练栈,并集成资源感知运行时,包括内存高效注意力、激活检查点、梯度累积、参数分片与能耗感知调度,显著降低资源消耗。我们在真实手机上评估了GPT-2、Gemma 3和Qwen2.5模型在多个微调任务上的表现,结果表明其能复现标准全量微调与LoRA行为,在内存受限设备上大幅提升可执行性。进一步通过私有校园健康代理应用验证:本地模型基于用户可穿戴传感记录微调,实现更个性化响应,原始数据始终保留在手机上。该成果确立MobileFineTuner为研究和构建嵌入式智能系统中设备端大模型微调的实用工具包。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。