A phone with 12 GB of RAM running a 177B-parameter model sounds like a category error. LLMs For All has made it happen: their Millie 2 model works on an iPhone 18 Pro with a million-token context, generating 14.1 tokens per second at short context and 9.9 tokens per second when answering a question about a million-token document (https://arxiv.org/abs/2611.41874).
The hard part was never the parameter count, it was fitting. The main checkpoint occupies 56.3 GB after compression, and at a million tokens the keys, values and index that attention needs add another 13.45 GB, which the paper rounds to 69.5 GB in total. Neither fits on a phone with 12 GB of RAM. So the paper splits the problem in two: both the weights and the attention data stream from flash on demand, and the model itself predicts in advance which pieces it will need, preferring the ones already sitting in RAM.
How the weights get in
The paper's parent model Qwen3.8-Flash-Next puts a mixture-of-experts module in every layer, with 512 routed experts and one shared expert, and the router picks 10 of them. Millie 2 has an earlier layer predict which 10 experts the next layer will use, adding a bias of +1.5 to the scores of experts already resident in RAM. When execution reaches the destination layer, its own router re-selects 10 from the updated resident pool using the current token state. Reads for nominated experts start while the preceding layer is still computing, and the least recently nominated residents are evicted when space runs short. The main configuration keeps 32 experts resident per layer, the ternary one keeps 48.
Attention history has to stream too
Weights are the manageable part, the KV cache is the bulk of it. The paper proposes Residency-Biased Attention (RBA): each sparse attention layer keeps a compact reference index in RAM, where every four tokens share a 132-byte index entry, while the full keys and values live on storage in the packed Q8 format at 1,088 bytes per token per layer. The index does the scoring, resident blocks receive a bonus of beta standard deviations, and the top 512 blocks get fetched. Fetched blocks can be reranked against the current query on the next round. The three configurations differ in what they keep: with 16,384 resident positions the packed payload plus index is about 0.61 GB, with 65,536 positions about 1.25 GB, while the full KV plus index for a million tokens is 13.45 GB. By the paper's own count, the 64K resident pool uses about one-eleventh of the memory.
Quality has to be earned back after quantization
The paper compresses weights to 2.54 bits per weight in Q3 or 1.66 bits in the ternary model, and compression alone costs quality. The recovery method leaves the quantized codes untouched and retrains a log multiplier per group: one scalar controls 128 weights, and an update rescales the whole group proportionally while preserving signs and ratios. Training distills against the teacher's next-token distribution, using roughly 39 million completion-token positions for Q3 and 100 million for the ternary model. The step that matters most: the student trains under the same expert-routing restrictions it will meet on the phone, so the scales adapt to the fact that not every expert can show up.
The numbers on the phone
The main configuration numbers the paper reports: on an iPhone 18 Pro, 14.1 tokens per second at short context and 9.9 at a million-token context; the ternary model gives 16.9 and 11.7. The REDMAGIC 12 Pro with 16 GB runs slower, at 9.6 for short context and 7.2 at a million tokens. The same configuration on the iPhone averages 8.84 tokens per second across 8,192 generated tokens in Q3, and 13.73 over the opening 512.
The paper takes a saved prefix and repeats it to push the history out, holding 7.6 tokens per second at 2.5M positions on the iPhone, with the REDMAGIC at 3.5 for 2.5M and 1.5 for 4M. The ceiling for a fully resident KV cache is in the table too: a 12 GB iPhone holds the full KV of 147,500 positions at once, the 16 GB REDMAGIC holds 229,420. Power was measured as well: in an hour unplugged the ternary model produced 29,001 tokens at 8.06 tokens per second including wall time, with the battery falling from 75% to 40%.
Machines with more memory have room left. The paper sweeps 48 combinations of resident expert count and admission bias on a 24 GB M5 MacBook Air. The main configuration runs at 20.0 tokens per second with a 6.8 GiB peak decode footprint and a KL of 0.071 nats per token; at 10.9 GiB it reaches 19.7 tokens per second with a KL of 0.047; a KL of 0.045 costs 14.9 GiB and 17.9 tokens per second.
What quality costs
The paper's self-reported benchmark scores put the loss in the same table. For Q3 against the parent model Qwen3.8-Flash-Next: GPQA Diamond scores 91.9 with RBA, 90.4 with native attention, and 90.4 for the parent; HumanEval base is 94.5, native attention gives 98.8 and the parent 98.8, which is where the gap shows; LiveCodeBench v6 gives 90.5 against 89.7 and 91.2; MuSR gives 76.6 against 75.9 and 78.8. The ternary models sit further from the parent overall, scoring about 0.9 percentage points below the unrestricted configuration across five suites weighted equally.
The paper's results at a million tokens are harder: across 64 questions spread over four contexts of roughly 990K tokens each, native attention answers 51 correctly, the RBA configuration with 64K resident positions answers 54, and the aggressive configuration with 16K resident positions answers 47. The teacher-to-student KL tells the same story at long context: near 990K positions the native run sits at 0.06487 and RBA at 0.07393, while a fixed 16K window pushes it to 0.59281.
For agent tasks, the paper runs model inference on the phone itself while a separate machine executes the task environment. On the 70 WebArena Lite tasks, Q3 on the iPhone scores 64.3 against the parent's 61.4. On the 116 AndroidWorld tasks, the ternary model on a Galaxy S26 Ultra scores 69.0 against the parent's 75.9, so the phone side does not beat the server across the board. On servers, SWE-bench Verified is 78.4 and Terminal-Bench 2.1 is 68.5, against the parent's 80.6 and 73.0.
The route is not travelled by one group
On servers, the same class of problem splits into several strands. On the weight side there is LLM in a Flash (https://arxiv.org/abs/2312.11514), whose windowing and row-column bundling let models run at twice the size of available DRAM; FlashMoE (https://arxiv.org/abs/2601.17063), which offloads inactive experts to SSD and uses machine learning to pick the cache, lifting hit rate over LRU and LFU by up to 51% and reaching up to 2.6 times the speed; and cache-conditional expert routing for mobile devices (https://arxiv.org/abs/2412.00099), which delivers two-fold speedups on phones with a training-free method. On the attention side there is Quest (https://arxiv.org/abs/2406.10774) estimating page relevance from the query, SparDA (https://arxiv.org/abs/2606.04511) using a Forecast projection to predict which KV blocks the next layer needs, and HiSparse (https://arxiv.org/abs/2608.07009) keeping the full KV history in host memory behind a fixed-size GPU cache, a branch already merged into SGLang.
One conclusion from PSR (https://arxiv.org/abs/2610.34721) deserves separate mention: cache-aware routing combined with asynchronous prefetch makes model output depend on transfer timing, so a harness that does not simulate that timing no longer evaluates the deployed model. That is why Millie 2 has to write the phone routing restrictions into training.
So what
The authors report that the choice of how many experts to keep resident can be left to deployment time, with the same checkpoint and a different resident count. The previous Millie 1.1 is a 35B model released in September 2026, and the vendor site describes it as occupying 4 GB of memory on an iPhone and working offline (https://llmsforall.com). At 177B the main checkpoint is 56.3 GB, and the whole chain has to stand on prediction.
The bottleneck for on-device inference is no longer how big the model is, but how accurately you can guess what comes next. A wrong guess means paying again; a right guess means waiting for nothing. What streaming inference actually streams is a prediction, and this time the prediction is trained as a capability of its own.