---
title: "Millie 2: 177B SLM Streaming on 12GB Phone RAM at 1M Tokens"
slug: "millie-2-177b-slm-streaming-12gb-phone-1m-token-context"
description: "Architecture analysis of Millie 2: expert streaming, residency-biased attention, and recovery training enable a 177B model on 12GB phones with million-token context."
author: "Hamdi Soudani"
category: "ai-llms"
archetype: "architecture-analysis"
published_at: "2026-12-04T02:03:22.32+00:00"
updated_at: "2026-12-04T02:03:22.369071+00:00"
canonical_url: "https://pyvren.com/blog/millie-2-177b-slm-streaming-12gb-phone-1m-token-context"
reading_time_minutes: 4
word_count: 810
quality_score: 88
tags: ["millie-2","llmsforall","on-device-llm","expert-streaming","mobile-ai"]
keywords: ["millie 2 177b phone inference","expert streaming language model mobile","12gb ram llm million token context","residency biased attention llm","on-device 177b parameter model"]
sources: ["https://huggingface.co/papers/2611.41874","https://huggingface.co/llmsforall/Millie-2-Ternary","https://tldr.tech/story/aa0f5b63-26bc-4d29-a79f-b0ea6e9a76d1"]
---

# Millie 2: 177B SLM Streaming on 12GB Phone RAM at 1M Tokens

> **TL;DR:** Millie 2 streams a 177B parameter model on a 12GB iPhone 18 Pro at 14 tok/s with short prompts and 10 tok/s at 1M-token context using expert streaming and residency-biased attention.

## Key Facts

- **Model parameter count:** 177 billion parameters ([source](https://huggingface.co/papers/2611.41874))
- **Target device RAM:** 12 GB iPhone 18 Pro ([source](https://huggingface.co/papers/2611.41874))
- **Short prompt throughput:** 14 tok/s ([source](https://huggingface.co/papers/2611.41874))
- **1M context throughput:** 10 tok/s from saved KV cache ([source](https://huggingface.co/papers/2611.41874))
- **Context window:** 1 million tokens ([source](https://huggingface.co/papers/2611.41874))
- **Parent model:** Qwen 3.8 Flash Next ([source](https://huggingface.co/papers/2611.41874))
- **Weight versions released:** Both versions of weights and inference code released ([source](https://huggingface.co/papers/2611.41874))

Millie 2 demonstrates that a 177-billion-parameter language model can run locally on a smartphone with 12GB of RAM while sustaining a million-token context window. The system achieves 14 tokens per second with a short prompt and 10 tokens per second at 1M context from a saved KV cache on an iPhone 18 Pro. This is not a compressed 7B model pretending to be large; it is the full 177B parameter count, streamed in pieces.

## Benchmark Verdict & Cost Math
The core engineering claim is that expert streaming avoids the memory wall that kills monolithic model loading on mobile devices. A naive FP16 load of 177B parameters requires roughly 354GB of memory, which is impossible on a 12GB phone. Even 4-bit quantization drops that to about 88GB, still far beyond mobile limits. Millie 2 sidesteps this by never keeping the full model in RAM. Instead, it streams expert weights from storage as needed, paying an I/O latency tax that residency-biased attention attempts to minimize by keeping frequently accessed experts resident.

Recovery training is the third pillar. Streaming introduces distribution shifts and dropped experts that degrade reasoning and coding performance. The authors recover accuracy by fine-tuning against the parent model, Qwen 3.8 Flash Next, so Millie 2 stays close to the teacher across reasoning, coding, and agentic benchmarks. The tradeoff is clear: you trade compute and storage bandwidth for memory headroom. On a phone, storage bandwidth is the bottleneck, not VRAM.

## Model / Runtime Quantitative Comparison Table

| Metric | Millie 2 (iPhone 18 Pro) | Monolithic 177B FP16 | Monolithic 177B Q4 | 
| --- | --- | --- | --- |
| Parameter count | 177B | 177B | 177B |
| Device RAM | 12GB | 12GB | 12GB |
| Model memory footprint | Streamed, partial resident | ~354GB | ~88GB |
| Short prompt throughput | 14 tok/s | N/A (OOM) | N/A (OOM) |
| 1M context throughput | 10 tok/s (saved KV cache) | N/A | N/A |
| Context window | 1M tokens | Limited by RAM | Limited by RAM |
| Parent model alignment | Qwen 3.8 Flash Next | N/A | N/A |

The table shows why streaming is the only viable path for this parameter count on mobile hardware. Monolithic loading fails immediately due to out-of-memory conditions, regardless of quantization.

## Context Window & Memory Bottlenecks
A million-token context creates its own memory pressure independent of model weights. KV-cache storage at 1M tokens scales with layer count and hidden dimension, and on a 12GB device the cache competes with OS memory, application state, and the streaming expert buffer. The paper reports 10 tok/s at 1M context from a saved KV cache, which indicates the cache is persisted to storage and reloaded rather than held entirely in DRAM. This introduces a cold-start penalty: the first token after a cache load pays the storage read latency, while subsequent tokens stream from the resident portion.

Context poisoning is a real risk at this scale. With a million tokens in the window, irrelevant or adversarial tokens can distract attention mechanisms. Residency-biased attention helps by prioritizing resident experts, but it does not eliminate distraction failure modes. KV-cache OOM remains possible if the cache grows beyond available storage bandwidth or if the phone thermal-throttles during sustained inference. The paper does not publish exact KV-cache byte sizes per 1K tokens, so engineers should treat the 1M-token figure as a demonstrated limit rather than a guaranteed production ceiling.

## Reproducible Inference / Routing Config
The llmsforall team released both versions of the weights and inference code. A minimal deployment sketch for expert streaming looks like this:

```yaml
model:
  name: millie-2
  parameter_count: 177B
  quantization: ternary
  streaming:
    enabled: true
    expert_residency_bias: true
    storage_backend: phone_flash
  context_window: 1000000
  kv_cache:
    saved_to_storage: true
    reload_on_resume: true
device:
  ram_gb: 12
  target: iphone_18_pro
inference:
  short_prompt_tok_s: 14
  million_context_tok_s: 10
```

Routing logic should prefetch the next likely expert based on attention patterns while the current expert executes. If the prediction misses, the pipeline stalls waiting for storage I/O. This is the primary failure mode under bursty or adversarial input: expert thrashing causes latency spikes that batching cannot hide because mobile thermal limits prevent sustained high-frequency storage access.

## Selection Rubric by Workload
Use Millie 2 when local privacy requirements prohibit sending prompts to a cloud API, when the workload fits within a million-token context, and when the device has at least 12GB of RAM with fast storage. The 10 tok/s at 1M context is acceptable for document summarization, codebase indexing, and long-form agentic reasoning where latency is secondary to data sovereignty.

Do not use Millie 2 for real-time conversational agents requiring sub-100ms time-to-first-token, for workloads exceeding 1M tokens, or on devices with less than 12GB RAM. The streaming architecture trades latency for memory, and expert thrashing under burst traffic can produce tail latency spikes that violate interactive SLOs. Cloud APIs with vLLM or SGLang backends remain preferable for high-concurrency, low-latency serving.

![Millie 2 paper cover showing streaming architecture for 177B model on phones at million-token context.](https://cdn-thumbnails.huggingface.co/social-thumbnails/papers/2611.41874/gradient.png)

The architecture is honest about its limits. Expert streaming and residency-biased attention are systems hacks that work within mobile constraints, not magic that eliminates memory costs. Teams evaluating this for production should benchmark storage read latency on their target hardware before committing to the million-token context path.

Sources: [Millie 2 paper on Hugging Face](https://huggingface.co/papers/2611.41874), [Millie-2-Ternary model card](https://huggingface.co/llmsforall/Millie-2-Ternary), [TLDR coverage of Millie 2](https://tldr.tech/story/aa0f5b63-26bc-4d29-a79f-b0ea6e9a76d1)

## Frequently Asked Questions

### How does Millie 2 fit a 177B model into 12GB of phone RAM?

It uses expert streaming to load only the active experts into memory rather than keeping the full model resident, combined with residency-biased attention to reduce storage reads and recovery training to maintain accuracy close to its parent model Qwen 3.8 Flash Next.

### Does Millie 2 release inference code and weights?

Yes, the paper states both versions of the weights and the inference code were released.

## Primary Sources

- https://huggingface.co/papers/2611.41874
- https://huggingface.co/llmsforall/Millie-2-Ternary
- https://tldr.tech/story/aa0f5b63-26bc-4d29-a79f-b0ea6e9a76d1
