Mobile AI Factory: Building Specialized Language Models for Your Mobile Device

Evan Li, Krishna Deshpande, Wen Cheng, Shyamnath Gollakota

University of Washington

Published November 10, 2026 · on the feed November 16, 2026 · ▲ 16 · arXiv 2611.13509

LLM training & RLEfficiency & inferenceAgents Full code arXiv ↗Hugging Face ↗Weights ↗

The abstract

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.

The Brief

2:28

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Mobile AI Factory. Building Specialized Language Models for Your Mobile Device. By Evan Li and three others, from the University of Washington. Published on the tenth of November.

A small language model running on a phone keeps user data private and works without a connection. The catch is that it performs well only when it has been fine-tuned for the target task and sized for the target device. Getting there today takes repeated rounds of expert tuning. Both halves matter. A model that is accurate but too large for the phone is no use on it, and a model that fits but was never adapted to the task performs poorly. Getting both right at once, for a particular task on a particular phone, is the work an expert currently does by hand.

Mobile AI Factory turns that tuning into an agentic system. Hand it a task specification and a target phone, and it builds a small model for that pair: fine-tuned, and quantized. Decisions are split between a language model and fixed rules. An orchestrator model chooses what to do next: tune hyperparameters, mine real data, or generate synthetic examples. Fixed rules then roll back any change that hurt accuracy. The output at the end is one specialized model, ready to run on that phone.

The search runs from small models to large, across base models and quantizations, and the accuracy goal adapts as the search goes. Crucially, it relies on real measurements taken on the target phone, across inference engines and backends, rather than on what the specifications suggest. Starting small means the search tries the cheapest candidates first, and the moving accuracy goal lets it adjust what it is aiming for as it learns what the task and the phone allow.

The evaluation covers ten tasks and four Android phones. On an unseen test set, the factory's on-device models outperform two five-shot frontier models on five of the tasks, by up to zero point three four, and match them on three more. On an entity extraction task, its search lands within zero point zero three of exhaustively training all twenty-seven model variants, while using nineteen times less GPU time. That comparison asks how much is lost by searching instead of trying everything, and the answer given is very little.

The phone measurements earn their place. The best configuration changes from one phone to another. Without those measurements, Claude Opus five point five, given the full hardware and model specifications, misses the app's requirements in twenty-five percent of easy and moderate cases, and in sixty percent of hard ones.

Two things carry the system. A language model proposes the next step, but plain rules keep the right to undo it. And the device itself, measured rather than described, has the final word on what fits.

The deep dive

6:04

A longer episode, written from the whole paper. Written and voiced by AI.

Transcript

Mobile AI Factory. Building Specialized Language Models for Your Mobile Device. By Evan Li and three others, from the University of Washington. Published on the tenth of November. This is the long version: the whole paper rather than the abstract.

Picture a keyboard app that rewrites a hastily typed message, running entirely on the phone, so private text never leaves the device and the feature works without a connection. Engines such as llama.cpp and MNN can already run small quantized models at practical speeds. The hard part is building the model: fine-tune it for the task, choose its size and quantization, and test it on the phone. And the answer changes with the phone. On the OnePlus 15, llama.cpp's GPU prefill is five point four times faster than its CPU prefill. On the OnePlus 8 Pro it is seven point four times slower. Repeating expert tuning for every phone, the authors argue, is impractical for all but the largest companies.

Three facts from the measurement study come first. Size is parameters and precision together: a two billion parameter model at four bits is smaller on disk than a sixteen-bit model of under one billion. Four bits is not one thing: MNN's default export rounds weights in blocks of sixty-four, while llama.cpp's recipe fits a scale per block of thirty-two and keeps sensitive layers at six bits. On the same fine-tuned SmolLM2 weights, intent classification falls from zero point seven seven to zero point six six under MNN's default. And spec sheets do not reveal what will run. Seventy-six configurations failed, and weight size predicted fewer than half of those failures. The OnePlus 8 Pro has more RAM than the Galaxy S23, yet decodes the eight-bit Qwen3-4B at under five tokens a second, where the OnePlus 15 manages over twelve.

The factory has two stages. A setup stage reads the target phone's profile: measured prefill and decode speed, peak memory and energy for every combination of model, precision, engine and backend. Each phone is profiled once and the profile is reused for every task. Configurations that break the developer's budgets, or failed on that phone, are dropped, and each surviving variant keeps whichever engine and backend decode fastest. The survivors are grouped into five tiers by size on disk. A held-out set is frozen behind four overlap firewalls, and the goal is set to the local teacher model's five-shot score, with a floor of zero point eight.

Then the loop. Each iteration, the orchestrator, Claude Sonnet 5, proposes exactly one change: new hyperparameters, more real data mined from the task's sources, or synthetic rows the teacher writes for the failure categories hurting accuracy most. It sees only aggregate scores and failure types, never the held-out rows. What it does not decide is the key design choice. Rollback, escalation and stopping are fixed rules. Any change that lowers accuracy is undone, and since training always restarts from the base model, undoing it is exact. The run moves up a tier when the score stalls over fifteen evaluations, or after thirty without reaching the goal. The reason is blunt. A run calls the orchestrator most when it is stuck, so the rule that notices being stuck cannot depend on it. And most of its ideas fail: in the longest run, eighty-eight percent of interventions made the model worse.

On unseen test rows, the factory's model beats Claude Sonnet 5 and DeepSeek, given five examples, on five of ten tasks, ties three and loses two. Margins are largest where the output format is strict: on biomedical entity extraction, a five hundred and seventeen megabyte model scores zero point eight three against Claude's zero point six five. The first plain fine-tune supplies a median of eighty-two percent of the improvement; search adds most on the smallest models.

The comparison that most directly tests the thesis is the search strategy. Training all twenty-seven variants on biomedical extraction took a hundred and sixty-five GPU-hours for a best of zero point eight six. Tiered search reached zero point eight three in a nineteenth of the time, stopping at its goal. Against letting the orchestrator pick one model up front, tiered search scored higher on eight of ten tasks, and its winner was a four billion parameter model on six; the one-shot pick never chose one. On the phone side, Claude Opus 5.5 with full spec sheets picked configurations that broke the requirements in a quarter of easy and moderate cases and sixty percent of hard ones, mostly by misjudging memory and the backend.

The paper has a discussion and limitations section. The developer still writes the metric and a verifier for outputs, which the authors call the most hand-engineered part of the pipeline, and the part that mattered most. The pool is fixed decoder models trained with LoRA only. Phones are profiled on CPU and GPU but not NPU, each configuration alone, from a cool start, with the phone otherwise idle. On the evidence, each configuration is a single run, because runs take days, and the exhaustive sweep covers one task. The synthesis gate was bypassed on seven tasks, which showed it to be too strict: on nested parsing the teacher scores point zero two, yet ninety percent of the rows it writes pass the task's check.

The idea to carry away is a division of labour. The language model proposes the next experiment; fixed rules decide whether it helped and whether the run is stuck. And a phone is an empirical object. Which model fits, on which engine and backend, is something you measure once and reuse, not something even a strong model can reason out from a spec sheet.

Paper Quest · 7 chapters · about 39 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Every quest starts with a wall. Here it is an expert redoing the same tuning for every phone.

You build a keyboard app that should rewrite messages with a small language model running on the phone itself, so user text never leaves the device and it works offline.

The road ahead

  1. 1 · The problem ~6 min A small model on a phone must be both trained for its task and sized for that exact phone, and today an expert does both by hand.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~8 min An agentic system does the expert's job: a language model picks each next training move, fixed rules undo harmful ones, and real phone measurements decide fit.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min The factory takes a task and a phone, loops through orchestrator-chosen changes with rule-based rollback, and outputs one quantized model with its engine.
  6. 6 · The experiment ~6 min You’ll guess: On an entity extraction task, how much less GPU time did Mobile AI Factory's search use than exhaustively training every model variant?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.