Most people assume that running a powerful AI model takes specialized hardware in a data center. With Millie 2, we wanted to see how far we could get with hardware people already own. It turns out a phone can do quite a lot.
Millie 2 runs a 177-billion-parameter language model on iPhone and Android phones. The model can draw on a million tokens of context when it answers, roughly several books’ worth of text in one session. On an iPhone 18 Pro, the main version generates an answer at 14 tokens per second with a short input and 10 tokens per second with a million tokens of context.
The main version of Millie 2 matches or comes close to its parent model, Qwen 3.8 Flash Next, across a range of tasks, from scientific reasoning and following detailed instructions to fixing bugs in real software projects. We tested it on agentic tasks, where the model chooses actions and uses tools to get things done, such as editing code, navigating websites, and controlling apps. For the website tests, we ran the model on an iPhone. For the app tests, we ran it on a Samsung Galaxy.
The iPhone 18 Pro has 12 GB of working memory, or RAM. The main model file takes up 56 GB of storage even after compression. At two bytes per parameter, the weights alone would take about 354 GB. At a million tokens of context, the model needs access to another 13 GB of data about the text it has read. To run the model on a phone, we changed how the phone loads its weights and retrieves that saved data. We also developed low-cost training to recover much of the performance that would otherwise be lost to compression and expert streaming.
AI companies are investing heavily in datacenters to serve models. How much infrastructure they need depends partly on where that work happens. A phone can now run a model that fixes real software issues and can answer questions about a document hundreds of thousands of words long. That makes it possible to build more capable applications around information that stays on the user’s device.
The smaller version of Millie 2 running on an iPhone in real time. This version is called ternary because many of its weights are stored using three possible values. The phone answers a reasoning question and then a question about a U.S. Food and Drug Administration (FDA) document with a million tokens of context. The phone read the document ahead of time so the model could pick up where it left off. The model receives the question during the demo and generates the answer live.
Why this is a substantial jump #
A phone has plenty of storage compared with its working memory, or RAM. Storage is much slower to read. A model can fit on the phone’s storage and still be unusable if generating each token requires too much data to be loaded.
Long inputs create a second memory problem. The model saves information about the text it has read so it can refer back to it when answering. This saved data, called the attention cache, grows with the length of the input.
We had already run a 35-billion-parameter model on a phone with Millie 1.1. PrismML ran 1-bit Bonsai 27B on an iPhone 17 Pro. One bit per weight means the stored code can make just two choices. Qualcomm demonstrated StepEdge-Omni, a 30-billion-parameter model, on a prototype phone using its new Snapdragon chip. Apple’s AFM 3 Core Advanced has 20 billion parameters, and Google’s Gemma 3n E4B has 8 billion in total. Millie 2 is about five times as large as Millie 1.1.
At a million tokens, keeping the full attention cache and the index the model uses to search it in working memory would take about 13.5 GB. With Residency-Biased Attention (RBA), the phone keeps the index in RAM and favors reusing attention data it already has there. At this length, the index and attention data together take 0.61 GB with more aggressive RBA, about one twenty-second as much. More conservative RBA uses 1.25 GB, about one eleventh as much.
The bars show calculated memory for attention data. At a million tokens, the full cache and its index exceed the iPhone’s 12 GB and leave about 2.5 GB on a 16 GB Android phone for the model, the operating system, and everything else.
One million tokens is the model’s supported context length. How much further can the phone itself go? We repeated the saved document cache to give the model 2.5 million positions to search. With that history, the 12 GB iPhone 18 Pro generated 128 new tokens at 7.6 tokens per second.
There is substantial industry interest in moving larger models onto phones. In November, Qualcomm CEO Cristiano Amon described leading AI companies targeting 100B-parameter models running locally on smartphones with all-day battery life by 2028. Millie 2 demonstrates the large-model execution part of that goal on phones today. Qualcomm’s earnings-call transcript.
We built Millie 2 by adapting Qwen 3.8 Flash Next, the parent model we compare against in this post. Most of the weights in both models are in small networks called experts. For each token, each model chooses a subset of those experts to activate. Millie 2 uses about 6.7 billion of its 177 billion weights for each prediction, while the phone keeps the whole model available in storage.
We offer two versions. In the main version, Q3, each expert weight is stored as a three-bit code that picks one of eight levels. The smaller ternary version uses three levels and takes up 36.9 GB on storage. This way of compressing weights by giving them fewer possible values is called quantization.
Three advances made this possible #
Expert streaming makes room for a much larger model. Millie 2 keeps some experts’ weights in RAM between tokens. When choosing which experts to activate, Millie 2 favors ones whose weights are already in RAM. It also predicts which experts it may need next so the phone can start their weights while it’s still computing.
Attention streaming makes room for much longer inputs. We developed Residency-Biased Attention (RBA) to favor data already in RAM when choosing which parts of the input to retrieve. We keep a small index of all the text the model has read and store the detailed attention data on the phone’s storage. The model predicts which portions of that history it will need and starts their data in advance. It can select from across the history while keeping only a fraction of the detailed data in RAM.
Low-cost recovery training restores much of the performance lost to compression and expert streaming. We leave the stored weight codes fixed and learn a multiplier shared by each group of weights. Changing that multiplier adjusts the whole group together, so training has far fewer numbers to update. Our training code uses the compressed weights directly both when running the model and when calculating the updates, which reduces training memory. We train with the expert choices restricted by the streaming rules the model uses when it runs on the phone. We ran this recovery training on a single server with four NVIDIA RTX PRO 6000 GPUs, training the scales on about 39 million tokens of model responses for Q3 and 100 million for ternary. For comparison, DeepSeek used 14.8 trillion tokens to pretrain DeepSeek-V3 from scratch.
Enough capability to do useful work #
We tested Millie 2 on phones and on CUDA GPUs, using the same streaming rules on both. For all five tests below, we ran Millie 2 Q3 with expert streaming and the more aggressive RBA setting, with a context limit of 131,072 tokens. The comparison is with Qwen 3.8 Flash Next running with its native attention and routing.
| Test | Millie 2 (Q3) | Qwen 3.8 Flash Next |
|---|---|---|
| Difficult science questions(GPQA Diamond) | 91.9% | 90.4% |
| Python programming(HumanEval+) | 92.1% | 95.7% |
| Competitive programming(LiveCodeBench v6) | 90.5% | 91.2% |
| Following detailed instructions(IFBench, strict) | 81.0% | 82.0% |
| Multistep reasoning(MuSR) | 76.6% | 78.8% |
At these contexts, the more aggressive RBA setting scored within three percentage points of the same Q3 model using its original attention method on each of the five tests.
We tested both RBA settings on 64 questions about million-token inputs. For every question, the supporting facts appeared at least 500,000 tokens earlier. In a GPU simulation of the phone settings, Millie 2 read the input using its original attention method. It then answered 47 questions correctly with more aggressive RBA, 54 with more conservative RBA, and 51 when it continued using its original attention method.
The technical paper includes more tests and checks how closely the server and phone versions agree. Technical paper
The agentic tests ask the model to fix software bugs, complete tasks by running commands, use websites, or control Android apps. The table shows the share of tasks that passed the benchmark’s checks within its time or action limits.
| Test | Tasks | Millie 2 ran on | Q3 | Ternary | Qwen 3.8 Flash Next |
|---|---|---|---|---|---|
| SWE-bench Verified | 500 | Server | 78.4% | 75.2% | 80.6% |
| Terminal-Bench 2.1 | 89 | Server | 68.5% | 53.9% | 73.0% |
| WebArena Lite | 70 | iPhone | 64.3% | — | 61.4% |
| AndroidWorld | 116 | Samsung Galaxy S26 Ultra | — | 69.0% | 75.9% |
Qwen 3.8 Flash Next ran on a server for all four tests. Millie 2 used expert streaming for all four tests, with original attention on the two server benchmarks and RBA on the two phones. We ran Millie 2 on the phones and kept the existing benchmark software on separate computers, where it ran the browser or Android emulator and checked the results.
SWE-bench Verified tasks ran with internet access disabled. The agent worked from the project files, and automated tests checked each fix. Terminal-Bench scores reflect the first attempt at each task.
These Q3 speed measurements use the same expert settings as the tests above.
| Device | Context length | Speed(tokens per second) |
|---|---|---|
| iPhone 18 Pro | Short | 14.1 |
| iPhone 18 Pro | 1M (FDA document) | 9.9 |
| iPhone 18 Pro | 2.5M (repeated prefix) | 7.6 |
| RedMagic 12 Pro | Short | 9.6 |
| RedMagic 12 Pro | 1M (FDA document) | 7.2 |
The iPhone’s short-input speed is measured over the first 128 tokens of a longer answer. At 1M context, both phones answered a question about the saved FDA document. The RedMagic’s 1M document run used the Galaxy S26 Ultra’s AndroidWorld attention settings. For the iPhone’s 2.5M test, we repeated the saved document cache and used the more conservative RBA setting. These speeds measure how fast the phone generates the reply after it has processed the input.
For a cloud reference, replies streamed through Codex at about 41 Qwen tokens per second for GPT‑6.1 Sol and 37 for GPT‑6 Astra. We timed the visible text from the first chunk to the last on three short writing prompts and counted tokens with the same tokenizer Millie 2 uses. Ternary reaches 16.9 tokens per second with a short input and 11.7 at 1M on iPhone, and 14.3 with a short input and 8.5 at 1M on the RedMagic 12 Pro. The technical paper gives the settings and measurements for both versions.
The phone slows down as it heats up. In an 8,192-token Q3 response on iPhone, generation averages 8.8 tokens per second across the full response. The headline speeds are from runs starting with a cool phone.
What’s possible with less RAM #
Streaming lets Millie 2 get close to its best measured generation speed and keep its predictions close to Qwen’s while using substantially less RAM. When you run it, you can tune how many experts it keeps in RAM and how strongly it favors reusing them. The chart calls these settings resident experts and residency bias. The black star marks the settings used for the main tests.
KL, short for Kullback–Leibler divergence, compares the probabilities Qwen (the teacher) and Millie 2 (the student) assign to the next token on the same text. Lower means their predictions are closer. The chart measures that difference in nats, a unit of information, per token. Decode speed is how fast the model writes its answer. One GiB of RAM is about 1.07 billion bytes.
Measured on a 24 GB M5 MacBook Air to explore memory budgets beyond those available on the phones. Each point is a measured configuration. The lines connect the measured points.
Like our expert streaming method, RBA lets us trade off memory, speed, and accuracy at inference time. We can adjust how much attention data stays in RAM and, at any given memory budget, how strongly the model favors passages whose data is already there. A stronger preference can speed up generation by reducing reads from storage, but it can also cause the model to overlook a passage it needs to answer correctly.
What becomes possible when the model stays with you #
A useful personal assistant needs access to information that is specific to you. It may need documents you are working on, the history behind a project, or details from previous conversations. The more capable it becomes, the more useful that context becomes too.
Running the model directly on the device lets it work with that information without sending it to a company that runs the model on remote servers. A person can ask questions about private documents. A business can build applications around confidential material while running the model on hardware it controls. Extensive context gives those applications room to work with substantial information at once.
Availability matters as well. The model can continue running while you travel, when connectivity is poor, or during an outage. Applications that work with information already on the device can keep working offline.
This also changes what developers can distribute. They can ship a capable model as part of an application and let the user’s device execute it. The provider can build a product around what the software does, with more of the model’s computation handled by hardware its users own.
Running more requests locally lets applications use hardware people already own and reduces the work their providers need to serve in the cloud. The streaming techniques can also help when a model runs in a data center. Expert streaming can make a large model fit a smaller GPU memory budget when serving a single request or a small batch. When GPU memory limits how many long-context requests a server can handle, RBA can let the same hardware serve more users by keeping less of each request’s attention cache in GPU memory. The cost and environmental impact depend on how much hardware and electricity the resulting setup needs to serve the same workload.
Developers could train different versions of the same model for different users, with each version running locally on the same hardware.
The combination is powerful: a capable model, extensive private context, and execution that the user can control. Millie 2 brings the underlying model capability and context much further into reach on personal hardware.
Where powerful AI runs #
The scale of investment in AI infrastructure reflects expectations about how much computation people will demand and where it will happen. As personal devices take on more of that work, more applications can run the model on the device itself.
We should take that possibility seriously. Phones and laptops are already a large part of the infrastructure people use to work, communicate, and manage their lives. Increasing what those devices can do with AI has consequences for privacy, availability, software distribution, and the infrastructure application providers need to operate.
Datacenters will continue to train models, serve requests remotely, and run many tasks at once. We see a future where local AI is a major computing platform, with capable models working alongside people’s information on devices they control. Our next step is to make it easier for developers to run these models reliably inside their apps, with support for more models and devices.
Millie 2 demonstrates that a phone can run a 177B model with million-token context, strong results on hard tests, and useful generation speed. That changes what we can expect from personal hardware today. We want to make powerful AI something people can run and control on their own devices, and we want other developers to be able to build on this work.
Release #
We’re releasing both versions of Millie 2 and the code that runs them. Millie 2 Q3 is the main model. Millie 2 Ternary takes up less storage. Millie Runtime 0.2 runs both versions. The technical paper describes the methods, benchmarks, and how we measured them.