llmvram.com
Microsoft · 3.8B dense · 32-layer GQA · 128K context

Phi-4 mini on a phone: RAM requirements

3.3 GiB provisional
at Q4_K_M · unsloth build · 4K context · free RAM needed
6GB-class phone runs it, razor-tight · 4GB is out — the smallest build misses by a hair

Phi-4 mini's recommended Q4_K_M build needs ~3.3 GiB of free RAM at 4K context — 2.3 GiB of measured weights plus a 0.50 GiB KV allowance and a 0.50 GiB runtime reserve. Count usable RAM at 60% of the sticker and the door for that build is a 6GB-class phone, razor-tight — 0.3 GiB to spare. This is the one honest caveat page in the phone family: 4GB is out, with the smallest tracked build (IQ2_M, 2.4 GiB) missing the 2.4 GiB usable budget by a hair; 12GB is still tight at its Q8_0 ceiling (2.4 GiB spare); 16GB is the comfortable tier. The LiteRT q8 build (4.6 GiB) runs in Google AI Edge Gallery as the 8GB door, razor-thin. Phones have no swap: past the line the app dies, it does not slow down.

TL;DR
On a 16GB phone: install PocketPal, download the unsloth Q4_K_M GGUF (2.3 GiB), keep context at 4K.
On a 6GB Android: Q4_K_M razor-thin (0.3 GiB spare), or Q2_K with 1.0 GiB. On an 8GB phone: the LiteRT q8 build in Google AI Edge Gallery (4.6 GiB) fits razor-thin. Skip 4GB phones for this model. MLC Chat will not load GGUF — it uses its own compiled format.

Phi-4 mini is Microsoft's compact instruct model (released 2025-02, MIT license): 32 layers of GQA attention, 128K context, and a measured Q4_K_M file of 2.3 GiB. It punches above its size on benchmarks — and the price on phones is the tightest budget in this family: no 4GB floor, a razor 6GB door, and Q8_0 still tight at 12GB. The official repo is not gated; its config and BF16 shards are pinned below alongside the GGUF and LiteRT mirrors.

Data verified · sources pinned in Where every number comes from

Runway chart: phone RAM platforms from 4 to 24GiB against four build door lines for Phi-4 mini at 4K context; the 4GiB phone is red no-fit, 6–12GiB phones are amber tight at their ceiling builds, 16GiB and 24GiB are green comfortable
Dots are each phone tier's verdict at its ceiling build; bands read headroom for the recommended Q4_K_M door. The 4GB dot is the family's first honest red: the smallest tracked build (IQ2_M, 2.4 GiB) misses 4GB's 2.4 GiB usable budget by a hair. 12GB sits amber on purpose — Q8_0 leaves 2.4 GiB, just under the 2.5 line — while Q4_K_M there is comfortable.

How much RAM at each build? (weights + 4K KV allowance + reserve)

Totals = measured weights + 4K-context KV allowance (0.50 GiB, classic-caliber upper bound from the pinned config: 8 KV heads × 128 dim × 32 layers) + runtime reserve (0.50 GiB, the site's pinned overhead anchor). Minimum phone = total ÷ 0.60 usable rule, rounded up to a real RAM tier. Monotonic: a phone that fits a bigger row fits every smaller one.
BuildWeightsTotal neededSmallest phone tierNote
IQ2_M1.4 GiB2.4 GiB6 GB tierthe floor — misses 4GB by a hair measured
Q2_K1.6 GiB2.6 GiB6 GB tierthe 6GB-class classic door measured
Q4_K_M — recommended2.3 GiB3.3 GiB6 GB tiercommunity default quality/size point — recommended measured
Q5_K_M2.7 GiB3.7 GiB8 GB tierthe 8GB-class ceiling measured
LiteRT (q8 ekv4096)3.6 GiB4.6 GiB8 GB tierGoogle AI Edge Gallery build — the 8GB razor door measured
Q8_03.8 GiB4.8 GiB12 GB tierthe 12GB-class ceiling, still tight measured

Caliber: this page counts in GiB throughout — the site-wide internal caliber — and applies the 60% usable rule to the sticker number as-is (4 → 2.4 GiB usable). Tier names keep the marketing GB spelling; every computed cell above derives from the pinned file bytes in provenance.

Is your phone enough? (find your phone class: one row tells you)

One row per phone class, ordered by RAM. Usable = total × 0.60 (the OS keeps the rest); verdicts follow the site-wide rule — TIGHT = under 2.5 GiB of headroom. The recommended build stays Q4_K_M on every class that fits it; the ceiling column only says how far each class can stretch.
Phone classRAMUsableBiggest build that fits (ceiling)Verdict
4GB budget Android4 GiB2.4 GiBnoneNO · smallest build misses by ~0.004 GiB
6GB class6 GiB3.6 GiBQ4_K_M (3.3 GiB)TIGHT · razor, 0.3 GiB spare
8GB — iPhone 15/16 Pro tier8 GiB4.8 GiBLiteRT q8 (4.6 GiB)TIGHT · razor at LiteRT, 1.5 GiB at Q4_K_M
12GB — Galaxy Ultra / iPhone 17 Pro tier12 GiB7.2 GiBQ8_0 (4.8 GiB)TIGHT · 2.4 GiB spare at Q8_0
16GB — Pixel Pro tier16 GiB9.6 GiBQ8_0OK · 4.8 GiB spare
24GB — OnePlus flagship tier24 GiB14.4 GiBQ8_0OK · 9.6 GiB spare

Each phone class has exactly one ceiling — the biggest tracked build that fits. KV cache is counted at 4K context with a runtime reserve — phones have no swap, so there is no soft landing past the line. iPhone 15/16 Pro tiers sit at 8GB; the iPhone 17 Pro generation moved the Pro tier to 12GB (Sept 2025), and Android flagships carry the 12–24GiB end.

What phone should you buy for it? (the 6GB razor logic)

The door
6 GB
Buys you
The recommended Q4_K_M build, razor — 0.3 GiB to spare at 4K
Comfortable pick
16 GB — Q4_K_M with 6.3 GiB spare, Q8_0 with 4.8 GiB spare
The logic6GB is the cheapest tier that runs the recommended Q4_K_M at all — and it is a razor: 3.3 GiB total vs 3.6 GiB usable. Below it, nothing tracked fits 4GB's 2.4 GiB usable budget. At 8GB the LiteRT q8 build joins in the Gallery, still razor. 12GB takes Q8_0 but stays tight by 0.1 GiB; 16GB is the first truly comfortable tier.
Why it is tightPhi-4 mini carries a 0.50 GiB KV allowance at just 4K context — the heaviest per-token KV in the 4B class here (32 layers × 8 KV heads) — and its quality-preserving builds start at 1.4 GiB. The budget math punishes both ends at once.
Representative hardwareGalaxy A-class (6GB), iPhone 15/16 Pro tier (8GB); 12GB = Galaxy S Ultra / iPhone 17 Pro tier; 16GB = Pixel Pro tier; 24GB = OnePlus flagship tier
Sourceunsloth GGUF listing + litert-community listing · accessed 2026-09-16 · measured

⚠ Tight is a site-wide threshold: under 2.5 GiB of headroom. 6GB × Q4_K_M leaves 0.3 GiB (razor); 12GB × Q8_0 leaves 2.4 GiB — tight by 0.1. On iOS the binding constraint is often the absolute per-app cap, not the percentage.

Tracked builds (actual file sizes, not theory)

One row per tracked Q4_K_M build. Verdict badges carry the 4K-context total: usable is 4.8 GiB on 8GB phones, 7.2 GiB on 12GB phones. For this model the two GGUF publishers list the same file size in our pinned listings — a mirror build, not a size decision.
BuildPublisherFile size8GB phone12GB phoneSource
Q4_K_M (recommended)unsloth2.32 GiBTIGHT · 3.3OK · 3.3HF @78eb92a4 verified
Q4_K_Mbartowski2.32 GiBTIGHT · 3.3OK · 3.3HF @7ff82c2a verified

Q4_K_M is the sweet spot, and again the publisher is not a size decision: unsloth and bartowski ship the same 2.32 GiB file. The LiteRT q8 ekv4096 build (3.6 GiB weights, 4.6 GiB total) is the Gallery runtime for 8GB phones — its KV cache is pre-bounded to 4096 tokens in the file name, which is why the page caps context at 4K. If you want Microsoft's own runtime instead, the official BF16 shards (7.1 GiB, pinned) are listed below — no phone fits those, they anchor the ladder.

How to run it on a phone

iOSPocketPal · LLM Farm
AndroidPocketPal · llama.cpp (Termux or APK) · Google AI Edge Gallery (LiteRT)
Not MLC ChatMLC Chat uses its own compiled model format and does not load GGUF files — for GGUF builds use PocketPal or llama.cpp.
Watch outThermal throttling cuts sustained tok/s on long generations; the OS reserve is why usable is 60%, not 100%; on iOS the per-app memory cap — not the percentage — is usually the binding constraint.

Why phone RAM math is different

Phones have no swap: when memory runs out the app dies, not slows. In the community measurements we sampled, not one shows graceful degradation on a phone — iOS kills the app silently (jetsam), Android's LMK does the same; the boundary is a cliff, not a slope. KV cache shares one RAM pool with the OS and your background apps — that is why this page counts usable RAM at 60% of the sticker number. It is the same memory math as the GPU pages, with the budget switched from VRAM to unified phone RAM.

Running the same model on a desktop GPU is a different buying question — graphics-card VRAM, not the phone already in your pocket.

On thermals: short prompts feel instant almost everywhere the model fits. Sustained generation is where phones differ — a 2026 benchmark measured an iPhone 16 Pro dropping from ~40 tok/s peak to ~22.5 sustained over 20 iterations, and community reports put throttling onset at 30–60 seconds, so treat any speed number as a cold-start figure unless the source says otherwise (links in provenance).

The weights on this page are measured — GGUF and LiteRT file sizes read off the publishers' listings at pinned revisions (accessed 2026-09-16). What stays estimated is the total: KV cache at 4K context and a runtime reserve are added by simple arithmetic, and the KV figure is a classic-caliber upper bound derived from the pinned config, not a per-token measurement. The 0.60 usable rule stays an experience value — now with community measurements behind it — and if a better-supported figure shows up, the chart's zone boundaries move and the verdicts are recomputed.

Where every number comes from (every figure carries its tag)

Weights: measured file sizes, read off the publishers' listings.
Totals: labeled additive estimates — measured weights + KV allowance + runtime reserve.
Caliber: GiB throughout, 60% usable rule applied to the sticker number. What stays estimated — the KV allowance, the reserve, the usable rule — is tagged as such. How we compute these numbers →
What each number slot is made of. These tags are the legend for every badge on this page.
TagSlotWhat it isWhat the verdict can claim
measuredWeightsFile sizes read off the publishers' Hugging Face listings at pinned revisions (accessed 2026-09-16): unsloth GGUF — IQ2_M 1.40, Q2_K 1.57, Q4_K_M 2.32, Q5_K_M 2.65, Q8_0 3.80 GiB; microsoft official — BF16 safetensors 7.15 GiB (config pinned); litert-community — LiteRT q8 ekv4096 3.64 GiB (tree 8cd368be7). Totals add a 4K KV allowance (0.50 GiB classic upper bound, from the pinned config: 8 KV heads × 128 dim × 32 layers) plus a 0.50 GiB runtime reserve.Solid at file granularity — the weights are the files you will download; only the KV/reserve add-on is arithmetic.
reportedUsable = 60% ruleExperience value for the OS + background share, backed by community measurements: the maintained per-device table spans ~49–81% usable (per-device memory-budget table, accessed 2026-09-13), with a 2026 forums report of iPadOS 26.4 silently cutting 8GB iPads to ~37.5% (Apple Developer Forums 826325, accessed 2026-09-13 — single source, treated as provisional); iOS enforces a hard per-app cap rather than a percentage — PocketPal PR #651 measured 52% → 70% with the memory entitlement (accessed 2026-09-13). 0.60 is our conservative default inside that range.Directionally safe — it separates 4GB phones from 16GB phones. On iOS the binding constraint is often the absolute per-app cap, not the percentage.
reportedApp compatibilityPocketPal / Google AI Edge Gallery (LiteRT) / llama.cpp — project pages, not re-tested by us on every device. MLC Chat uses its own compiled format and does not load GGUF files — listed here as a correction, not an option.These apps load builds of this size class — stands on the linked pages, re-checkable by you.
reportedThermal throttling 30–60%Benchmarks + community measurements of sustained-generation slowdown on phone SoCs: iPhone 16 Pro measured ~40 → ~22.5 tok/s over 20 iterations (2026 thermal benchmark paper, accessed 2026-09-13; Apple-silicon LLM benchmark suite).Expect slowdown on long generations — never a cold-start speed promise.
Pinned sources: every row clickable and dated.
unsloth/Phi-4-mini-instruct-GGUF@78eb92a4accessed 2026-10-12
bartowski/microsoft_Phi-4-mini-instruct-GGUF@7ff82c2aaccessed 2026-10-12
microsoft/Phi-4-mini-instruct (official)cfbefacb9accessed 2026-09-16
litert-community/Phi-4-mini-instruct8cd368be7accessed 2026-09-16
SO 5887248 · per-device memory budget tablelatestaccessed 2026-09-13
Apple Developer Forums 826325 · iPadOS 26.4 cap cutlatestaccessed 2026-09-13
PocketPal PR #651 · entitlement 52%→70%latestaccessed 2026-09-13
zenn.dev · iOS memory entitlements measurement2026-06accessed 2026-09-13
2026 thermal benchmark paper (arXiv 2603.23640)2026-03accessed 2026-09-13
john-rocky/apple-silicon-llm-benchlatestaccessed 2026-09-13

FAQ

Can Phi-4 mini run on Android?

Yes — GGUF builds load in PocketPal or llama.cpp, and the LiteRT q8 build runs in Google AI Edge Gallery. Cap context at 4K: the LiteRT file pre-bounds its KV cache to 4096 tokens, and the classic-caliber KV allowance at 4K is 0.5 GiB.

Is 4GB RAM enough for Phi-4 mini?

No — this is the honest red on the chart. The smallest tracked build (IQ2_M) totals 2.4 GiB against 2.4 GiB usable on a 4GB phone, missing by a hair. 6GB is the door.

Is 6GB RAM enough for Phi-4 mini?

Enough for the recommended Q4_K_M, razor-thin: 3.3 GiB total against 3.6 GiB usable, 0.3 GiB to spare. Q2_K buys 1.0 GiB of headroom. 16GB is the comfortable tier.

Which Phi-4 mini build should I download?

For Google AI Edge Gallery, the LiteRT q8 ekv4096 build (3.6 GiB weights). For PocketPal or llama.cpp, the Q4_K_M GGUF — unsloth and bartowski list 2.32 GiB files at the same size for this model.

What app runs Phi-4 mini on a phone?

PocketPal or llama.cpp for GGUF builds; Google AI Edge Gallery for the LiteRT build. MLC Chat uses its own compiled format and does not load GGUF. Cap context at 4K.