Inkling-2-FlashPin-26B-GGUF: 26B MoE on iPhone 15 Pro (llama.cpp, CPU only)
26.4B-parameter MoE (128 experts/layer, 24 blocks), a 1-pass top-4 distill of thinkingmachines/TML-d24-varloop-research (Apache-2.0), running on an iPhone 15 Pro with patched llama.cpp, CPU only, Metal off. Hot experts stay pinned in RAM. Cold experts stream from flash. Not Inkling 2 Mini.
Code, the llama.cpp patch, the iOS harness, and raw logs: kevindechang/inkling-ios.
A 32s airplane-mode demo (3-turn chat, 19.7 tok/s average, 4.2 GB RAM, CPU only) is in this X post.
Published v2 math bench on the iPhone 15 Pro (unplugged, thermal nominal, v35d env): median 22.46 tok/s decode (3 runs, 20.79-22.83) on a 66-token p_math prompt with 200 generated tokens. Mixed prompts (127-token v34_mix, 200 generated tokens) median 20.86 (20.64-23.03). Warm prefill + first logit about 0.7s (40-token warm second turn, not end-to-end TTFT). Peak RAM 4,315 MB. Raw logs: eval/results/iphone15pro_v36_v2/. The v1 speed table later on this card is v1 only.
Quality (v2, 80-item suite, Mac M4 Pro, CPU-only, not the phone): BFCL 13/20 (65%) with CECAR off and 11/20 (55%) on the OPT route. No full-precision 3-pass reference has been measured for this model. Small N. A speed demo, not a full assistant yet.
A later 236-item Mac run of v2 is in docs/V3.md: on the 2,700 MB / 36 pin phone route, reasoning 44.2% / 120, BFCL 60.5% / 76, IFEval 47.5% / 40 (run 1); with routing off, BFCL 78.9% and IFEval 65.0%. Two candidate GGUFs also live under candidates/ (see the v3 section below). They are not the recommended release. v2 remains the recommended file.
A later v2 short-prompt phone-route speed run (cache 2,700 MB, 36 pinned experts, CECAR bonus 1.0, one cool-phone run, decode after the first token) is 19.6 tok/s on the math prompt, 19.2 on the mix prompt, peak 3.74 GB. That is not a replacement of the 22.46 tok/s / 4,315 MB v35d figures above. Details and logs: docs/V3.md section 3.3.
3-category mean is the unweighted average of three category scores: reasoning (Reas, items correct / 45 across GSM8K-Hard 15 + MATH-500 10 + Logic 10 + GPQA 10), tool calling (BFCL, /20), and instruction following (IFEval, /15). It is not the unweighted mean of the six per-task percentages, and not items-correct / 80. Example: v2 CECAR-off is (51.1 + 65.0 + 53.3) / 3 = 56.47%, reported as 56.5%.
10-minute continuous generation has not been measured. The longest published v2 decode is 285 tokens (19.26 tok/s, about 15 s of decode); the longest published v1 decode is 400 tokens (18.36 tok/s, about 22 s).
Important Model Lineage & Scope Notes:
- This checkpoint is derived from
thinkingmachines/TML-d24-varloop-research(the variable-loop 26.4B research sibling of Inkling 2), not the fixed 3-pass Inkling 2 Mini checkpoint.- It is distilled and calibrated for 1 loop pass, top-4 experts (
-passes 1 -k 4), while retaining all128/128experts (zero experts pruned).- Experts are reordered per layer so the top-40 hot experts live at indices
0..39for permanent RAM pinning (GGML_MMID_PIN_N=36..40), while cold experts40..127stream from NVMe flash on demand.- Requires the opt-in
llama.cpppatch inkevindechang/inkling-ios(againstllama.cpp @ 8a97fa98/b12628) for 1-pass override, Hot-40 expert pinning, paired-downasync overlap,CECAR, and custom ARM64 NEON/i8mmkernels.
Files
| File | Size | SHA-256 | Quant Mix (128/128 Experts Intact) |
|---|---|---|---|
inkling2-26b-flashpin-1p-hot40-q2k-i8mm.gguf | 10,080,548,288 B (9.39 GiB) | 6d856056c0ff323711a487233dc5c63425f1896547803c38aac6c5f39d2acf09 | gate_up: 23× Q2_K + L23 Q4_K; down: 11× Q2_0 + 10× Q4_0 + 3× IQ4_NL; routers: Q8_0; attention: Q4_K/Q5_K/Q6_K/Q8_0; output: Q4_K; token_embd: IQ4_XS |
inkling2-26b-flashpin-v2-1p-hot40-q2k-i8mm.gguf (v2 quality update, recommended) | 10,080,548,288 B (9.39 GiB) | 9b6b87fdb8fa01deb3b69ffbee6e59b98ecea65b1f3305d5fbb9db3d3bebc351 | Same exact tensor layout, 128/128 experts intact, Hot-40 order preserved; retrained with QAT working-set distillation (qat40pareto, 220 steps) |
Two more files live under candidates/ (same size, same layout). They are work-in-progress and not the recommended release. SHA-256 and scores: v3 Candidates.
(Optional zero-repack layout: run tools/prerepack_exps --pack from inkling-ios locally to rewrite the 48 expert tensors in-place at the exact same file size for GGML_MMID_PREREPACKED=1; reversible via --unpack back to the exact SHA-256 above.)
iPhone 15 Pro Speed — v1 GGUF (v35, Exact 200K Head, 8K Q8_0 KV)
Prepack=0 rows (v35a, v35d, v35_mix) run directly on this published byte-exact GGUF (SHA-256: 6d856056...2acf09); Prepack=1 rows (v35f, v35f_mix, v35g) run on its logically equivalent, bit-reversible offline-repacked layout (tools/prerepack_exps --pack, exact same file size, reverses cleanly back to 6d856056...2acf09). Measured on an iPhone 15 Pro (A17 Pro, 6 GiB increased-memory-limit entitlement, -t 2 -tb 4 -ub 64 -passes 1 -k 4 -c 8192 -ctk q8_0 -ctv q8_0, GGML_SITU_FAST=accel, LLAMA_LM_HEAD_SHORTLIST=off). Note: [warm_ttft] times warm 40-token prompt prefill through computing the final prompt token's greedy logit (llama_batch_get_one) on a warm expert cache; it excludes ~0.1 ms detokenization and cold load. All raw per-token logs and prompt files are published in inkling-ios/eval/results/iphone15pro_v35/.
| Run | Prompt / Gen | Cache / Pin / Route | Prepack | Zero-Miss | Med / Mean | Sustained tok/s | Warm Prefill / 1st-Logit (40t) | Peak / Steady RAM | Thermal |
|---|---|---|---|---|---|---|---|---|---|
v35a | p_math (66t) / 200 | 2700 / 36 / OPT λ=0.95 | 0 | 31 ms | 39 / 43 ms | 23.43 | 0.978 s | 4,081 / 3,945 MB | nominal → nominal |
v35d | p_math (66t) / 200 | 2950 / 40 / CECAR=0.35 | 0 | 34 ms | 42 / 46 ms | 21.78 | 0.761 s | 4,334 / 4,187 MB | nominal → nominal |
v35f | p_math (66t) / 375 (EOG) | 2700 / 36 / OPT λ=0.95 | 1 | 34 ms | 43 / 47 ms | 21.20 | 1.133 s | 4,062 / 3,927 MB | nominal → nominal |
v35f_mix | v34_mix (127t, 3 topics) / 400 | 2700 / 36 / OPT λ=0.95 | 1 | 36 ms | 52 / 54 ms | 18.36 | 1.126 s | 3,975 / 3,922 MB | nominal → nominal |
v35_mix | v34_mix (127t, 3 topics) / 200 | 2700 / 36 / OPT λ=0.95 | 0 | 34 ms | 55 / 57 ms | 17.46 | 1.038 s | 3,990 / 3,933 MB | nominal → nominal |
v35g (opt lossy head) | p_math (66t) / 200 | 2700 / 36 / OPT λ=0.95, margin (26,1) | 1 | 26 ms | 37 / 42 ms | 23.62 | 1.131 s | 4,094 / 3,954 MB | nominal → nominal |
Quality (N=80 Deterministic Subset — Raw Predictions Published)
Measured on this exact published GGUF (prepack=0) across 80 deterministic code-scored items (15 GSM8K-Hard, 10 MATH-500, 10 Logic, 10 GPQA Diamond, 20 BFCL, 15 IFEval; coding and obscure trivia excluded). Aggregate JSONs and all 480 raw per-example predictions (*_replies.jsonl) live in inkling-ios/eval/results/quality_80item/.
Routing Mode (prepack=0 GGUF) | Think Cap / Effort | GSM8K-Hard | MATH-500 | Logic | GPQA | BFCL | IFEval | 3-category mean | Avg Think | Cache Hit (3000 MB) |
|---|---|---|---|---|---|---|---|---|---|---|
CECAR=0 (c000_sc320, max quality) | cap=320, e=0.20 | 60.0% (9/15) | 30.0% (3/10) | 10.0% (1/10) | 10.0% (1/10) | 80.0% (16/20) | 66.7% (10/15) | 59.3% | 245 | 75.3% |
OPT λ=0.95 (opt95_e045, v35a route) | uncapped, e=0.45 | 73.3% (11/15) | 30.0% (3/10) | 20.0% (2/10) | 20.0% (2/10) | 75.0% (15/20) | 46.7% (7/15) | 53.9% | 761 | 90.6% |
OPT λ=0.95 (opt95_e020, v35a route) | uncapped, e=0.20 | 80.0% (12/15) | 40.0% (4/10) | 20.0% (2/10) | 0.0% (0/10) | 60.0% (12/20) | 60.0% (9/15) | 53.3% | 774 | 91.8% |
OPT λ=0.85 (opt85_sc320) | cap=320, e=0.20 | 60.0% (9/15) | 30.0% (3/10) | 10.0% (1/10) | 30.0% (3/10) | 60.0% (12/20) | 60.0% (9/15) | 51.9% | 250 | 90.2% |
OPT λ=0.95 (opt95_sc320, concise) | cap=320, e=0.20 | 73.3% (11/15) | 30.0% (3/10) | 10.0% (1/10) | 30.0% (3/10) | 60.0% (12/20) | 46.7% (7/15) | 48.9% | 249 | 92.2% |
Honest Quality Note: Quality on multi-step Logic (10–20%, N=10), GPQA (0–30%, N=10), and MATH-500 (30–40%, N=10) remains the primary gap from cutting 3 loop passes → 1 pass + Q2_K quantization, and small N=10 subsets carry wide variance. CECAR routing bias cuts NVMe flash misses by ~3× (enabling 21–23.4 tok/s on iPhone 15 Pro), but reduces strict tool-call JSON accuracy (BFCL 80% → 60–75%). On short tool-calling turns (20–50 output tokens), disabling CECAR (GGML_MMID_CECAR_BONUS=0) recovers 80.0% BFCL and 66.7% IFEval on the exact same file.
v2 Quality Update (inkling2-26b-flashpin-v2-1p-hot40-q2k-i8mm.gguf)
v2 keeps the v1 file size, layout and Hot-40 order. Quality numbers in the table below were measured on a Mac (M4 Pro, CPU-only). iPhone 15 Pro speed for v2 is measured: see the paragraph above and the GitHub v36 logs. A 236-item Mac run of v2 is in docs/V3.md. prepack=1 has not been run on v2.
v2 retrains on top of the shipped quantized weights via QAT working-set distillation (qat40pareto, 220 steps, $12.51 Spot). Full details, training curves, Mac logs, and raw per-example predictions live in inkling-ios/docs/V2.md.
The iPhone 15 Pro speed table earlier on this card is v1 (6d856056...). v2 phone speed is in the opening paragraph and in the v36 logs.
Model / Arm (N=80, effort 0.45, uncapped) | Route (cache / pin) | GSM8K-Hard | MATH-500 | Logic | GPQA | Reas (45) | BFCL | IFEval | 3-category mean | Cache Hit |
|---|---|---|---|---|---|---|---|---|---|---|
v1 opt95_e045 | OPT λ=0.95 (3000 / 32) | 73.3% (11/15) | 30.0% (3/10) | 20.0% (2/10) | 20.0% (2/10) | 40.0% | 75.0% (15/20) | 46.7% (7/15) | 53.9% | 90.6% |
v2 v2_c000_e045 | CECAR=0 (2950 / 40) | 80.0% (12/15) | 40.0% (4/10) | 50.0% (5/10) | 20.0% (2/10) | 51.1% | 65.0% (13/20) | 53.3% (8/15) | 56.5% | 80.8% |
v2 v2_opt95_e045 | OPT λ=0.95 (2700 / 36, v35a route) | 73.3% (11/15) | 40.0% (4/10) | 40.0% (4/10) | 10.0% (1/10) | 44.4% | 55.0% (11/20) | 66.7% (10/15) | 55.4% | 95.9% |
- Sample sizes in this 80-item table are small (
N=10each for MATH-500, Logic, GPQA). A 236-item Mac run of v2 is in docs/V3.md. iPhone 15 Prov36telemetry on v2 is published in the v36 logs. - On Mac under identical
OPT λ=0.95settings (2700 / 36), v2 reads11.3/11.9expert slices/tok onp_math/v34_mixvs10.8/13.1for v1.
v3 Candidates (work in progress, 2026-12-01)
v2 above is still the recommended file. Two candidate files are in candidates/; a third (Phase 2, trained for 1 and 2 loop passes) is trained but not yet built or tested. Full tables, method and open problems: docs/V3.md.
| File | What it is | sha256 |
|---|---|---|
candidates/inkling2-26b-flashpin-v2-nobias-1p-hot40-q2k-i8mm.gguf | v2 with the trained cold-expert router bias set to zero; no training | 2098b770f3300d65f951079127d9193eb7777be47ee47fcf11c9e0cd92023dba |
candidates/inkling2-26b-flashpin-v3p1-s360-1p-hot40-q2k-i8mm.gguf | Phase 1: 360 more distillation steps without that bias, trained under simulated cache-aware routing | 1abcba8c182ebb65c4841dd75176e4a13d8c2d6967d673adfd4c2088f7bfa99a |
Mac scores at the fast phone setting (cache-aware routing on, 2,700 MB cache, 36 pinned experts; greedy; percent correct) and iPhone 15 Pro speed (1 pass, cool phone, 200 tokens):
| v2 | v2, bias removed | Phase 1 | |
|---|---|---|---|
| Reasoning, 120 items | 44.2 | 47.5 | 46.7 |
Tool calls (BFCL subset, 76 items, plain-text <tool_call> format) | 60.5 | 76.3 | 77.6 |
| Instruction following (IFEval subset, 40 items; two runs) | 47.5 | 67.5 / 57.5 | 57.5 / 50.0 |
| iPhone 15 Pro, math / mixed prompt | 19.6 / 19.2 tok/s | 17.5 / 16.3 | 18.2 / 17.1 |
| Peak memory on the phone | 3.74 GB | 3.79 GB | 3.77 GB |
These phone speeds are the 2,700 MB / 36 pin route (CECAR bonus 1.0), one cool-phone run, decode after the first token (tok1+). They are not the published v35d headline (median 22.46 tok/s, peak 4,315 MB; cache 2,950 MB / 40 pinned / CECAR 0.35; median of three unplugged runs; mean of all 200 decode tokens). v2 math is 19.62 t/s, peak 3,744 MB; mix is 19.24 t/s, peak 3,749 MB. Bias-removed peak is 3,792 MB (math) and 3,798 MB (mix), reported as 3.79 GB. Phase 1 peaks are 3,770 / 3,764 MB. Logs: v41, v46.
Things to know before using any of these files:
- The 40-item instruction set moves by up to 10 points between runs when cache-aware routing is on, so the two candidates cannot be separated on it.
- Speed falls as the conversation grows, for every file: about 17 to 18 tok/s at 300 tokens of context and about 12 tok/s at 2,500. Short-prompt numbers overstate chat speed.
- Continuous generation takes the phone to thermal state "serious" in 2 to 8 minutes and costs about 16% of speed before that.
- Running Phase 1 at 2 loop passes (
-passes 2), with no 2-pass training, scores 56.7 on reasoning and 86.8 on tool calls at about 11 tok/s on the phone. - Tool calls were measured only in the plain-text format. The chat-template tool format failed in one app test and has no score yet.
Method Summary (FlashPin-1P)
- 1-Pass
K=4Self-Distillation: LoRA + router co-adaptation against the 3-passK=8BF16 teacher, merged cleanly from streamed BF16 via HTTPRange+ officialimatrix(zero double-quantization). - KL-Optimal Latency-Aware Quantization +
i8mmUpgrades: MixedQ2_K/Q4_Kgate_up,Q2_0/Q4_0/IQ4_NLdown,Q8_0routers, andQ4_K–Q8_0attention tailored to the A17 Proi8mmroofline. - Hot-40 Pinning + Paired-
downAsync Overlap + Per-LayerCECAR: Top-40 experts pinned at indices0..39; cold safety-net experts stream viaF_NOCACHEparallelpreadoverlapped withgate_upcompute. - Lossless ARM64 NEON / Accelerate Kernels: Zero-bloat NEON
4×4repacking/GEMV, tiled 64-tok GQAQ8_0Flash-Attention, batched repacked MoE GEMM, IEEE zero-ULP row-broadcast NEONADD/SUB/MUL/DIV, Apple Accelerate fusedSiTU, and-ub 64compute-buffer halving (242.7 → 121.4 MiB).
Quickstart
Full build instructions, llama.cpp patch (8a97fa98), and iPhone devicectl runner scripts are in https://github.com/kevindechang/inkling-ios:
# Recommended: v2 file, v35d env (published median 22.46 tok/s on p_math, 3 unplugged runs).
# Requires the patched llama.cpp from kevindechang/inkling-ios.
INKLING_ALLOW_ONE_PASS=1 INKLING_GREEDY_SKIP_SOFTCAP=1 GGML_SITU_FAST=accel \
GGML_MMID_CACHE_MB=2950 GGML_MMID_PIN_N=40 GGML_MMID_OVERLAP=1 GGML_MMID_REPACK=1 \
GGML_MMID_LRU=1 GGML_MMID_IO_THREADS=4 GGML_MMID_CECAR_PREFILL=1 GGML_MMID_CECAR_BONUS=0.35 \
LLAMA_LM_HEAD_SHORTLIST=off \
gen -m inkling2-26b-flashpin-v2-1p-hot40-q2k-i8mm.gguf \
-ngl 0 -t 2 -tb 4 -ub 64 -passes 1 -k 4 -lm none -lzm on -c 8192 -ctk q8_0 -ctv q8_0 -n 200
# v1 / v35a example (the 2700 / 36 route used for the later v3 phone-route comparisons):
# INKLING_ALLOW_ONE_PASS=1 INKLING_GREEDY_SKIP_SOFTCAP=1 GGML_SITU_FAST=accel \
# GGML_MMID_CACHE_MB=2700 GGML_MMID_PIN_N=36 GGML_MMID_OVERLAP=1 GGML_MMID_REPACK=1 \
# GGML_MMID_LRU=1 GGML_MMID_IO_THREADS=4 GGML_MMID_CECAR_PREFILL=1 GGML_MMID_CECAR_BONUS=1.0 \
# GGML_MMID_CECAR_LAYERS="0.18,0.29,0.29,0.33,0.33,0.44,0.12,0.21,0.21,0.21,0.25,0.15,0.18,0.12,0.15,0.21,0.44,0.00,0.38,0.29,0.21,0.25,0.50,0.18" \
# LLAMA_LM_HEAD_SHORTLIST=off \
# gen -m inkling2-26b-flashpin-1p-hot40-q2k-i8mm.gguf \
# -ngl 0 -t 2 -tb 4 -ub 64 -passes 1 -k 4 -lm none -lzm on -c 8192 -ctk q8_0 -ctv q8_0 -n 200
License
Apache 2.0 (matching thinkingmachines/TML-d24-varloop-research).