移动AI工厂:为你的移动设备构建专用语言模型

·

研究论文 · 2026/11/16

移动设备上的小型语言模型(SLM)能保护隐私且离线可用,但需针对任务和设备进行微调与量化,目前依赖专家反复调优。本文提出 Mobile AI Factory,一个智能体系统,可根据任务规格和目标手机自动构建微调并量化的 SLM。系统由编排 LLM 决定调参、挖掘真实数据或生成合成样本,并用固定规则回滚损害精度的改动;搜索从小模型到大模型、跨基座与量化方案,动态调整精度目标,并利用目标手机在推理引擎和后端上的真实测量。在十个任务和四款 Android 手机上评估,其端侧模型在五个任务上比两个五样本前沿模型高最多 0.34,在三个任务上持平;在实体抽取任务上搜索效果与穷举训练全部 27 个变体相差 0.03 以内,GPU 时间少 19 倍。手机测量也重要:最佳配置因手机而异;无手机测量时,Claude Opus 5.5 在简单/中等案例中 25% 未达应用要求,困难案例中 60% 未达。代码已开源。

该论文提出了一种自动化构建移动端专用 SLM 的智能体系统,显著降低了专家调优成本,并在多个任务和手机上验证了其有效性,同时强调了设备实测对配置选择的关键影响,对移动 AI 部署具有实用价值。

Small language models (SLMs) running on mobile devices can keep user data private and work without connectivity. But they perform well only when fine-tuned for the target task and sized for the target device, a process that today requires repeated expert tuning. We present {\it Mobile AI Factory}, an agentic system that builds a fine-tuned, quantized SLM for a given task and phone. Given a task specification and a target phone, an orchestrator LLM chooses whether to tune hyperparameters, mine real data, or generate synthetic examples, while fixed rules roll back changes that hurt accuracy. The factory searches from small to large models across base models and quantizations, adapts its accuracy goal as it searches, and uses real measurements of the target phone across inference engines and backends. We evaluate Mobile AI Factory on ten tasks and four Android phones. On an unseen testset, its on-device models outperform two five-shot frontier models on five tasks, by up to 0.34, and match them on three more. Its search comes within 0.03 of exhaustively training all 27 model variants on an entity extraction task, while using 19times less GPU time. Phone measurements also matter: the best configuration changes across phones. Without phone measurements, Claude Opus 5.5, given the full hardware and model specifications, misses the app's requirements in 25\% of easy and moderate cases and in 60\% of hard ones. Code is available at: https://github.com/evanly-gh/SLM_Factory.

阅读原文

参与讨论