Skip to main content

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

Architecture analysis of Millie 2: expert streaming, residency-biased attention, and recovery training enable a 177B model on 12GB phones with million-token context.

FRONTIER LLMS Deep Dive
Paper page - Millie 2: Streaming a 177-Billion-Parameter Language Model on Phones at Million-Token Context
Paper page - Millie 2: Streaming a 177-Billion-Parameter Language Model on Phones at Million-Token Context Source: huggingface.co
Field Note · The Short Version 4 min read

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 Numbers & Verified Specs

7 metrics
Metric / Spec Verified Finding Source
Model parameter count 177 billion parameters huggingface.co
Target device RAM 12 GB iPhone 18 Pro huggingface.co
Short prompt throughput 14 tok/s huggingface.co
1M context throughput 10 tok/s from saved KV cache huggingface.co
Context window 1 million tokens huggingface.co
Parent model Qwen 3.8 Flash Next huggingface.co
Weight versions released Both versions of weights and inference code released huggingface.co
Jump to section (5) +

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

MetricMillie 2 (iPhone 18 Pro)Monolithic 177B FP16Monolithic 177B Q4
Parameter count177B177B177B
Device RAM12GB12GB12GB
Model memory footprintStreamed, partial resident~354GB~88GB
Short prompt throughput14 tok/sN/A (OOM)N/A (OOM)
1M context throughput10 tok/s (saved KV cache)N/AN/A
Context window1M tokensLimited by RAMLimited by RAM
Parent model alignmentQwen 3.8 Flash NextN/AN/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:

YAML18 lines
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.
Millie 2 paper cover showing streaming architecture for 177B model on phones at million-token context.

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, Millie-2-Ternary model card, TLDR coverage of Millie 2

Visual Evidence

Figures from Cited Sources

llmsforall/Millie-2-Ternary · Hugging Face
Hugging Face model card for Millie-2-Ternary weights release. huggingface.co

Reader Q&A

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.

Bibliography & Verification

Primary Sources & References

3 cited sources
  1. [01] huggingface.co papers / 2611.41874
  2. [02] huggingface.co llmsforall / Millie-2-Ternary
  3. [03] tldr.tech story / aa0f5b63-26bc-4d29-a79f-b0ea6e9a76d1

Human × Agent Co-Work

Hamdi Soudani · in collaboration with Pyvren

Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.

Hamdi Soudani × Pyvren

Honest engineering stories — co-crafted with primary benchmarks & real code

Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.