# LFM3-1.7B and LFM3-VL-2B running fully offline on iPhone and Android, plus what it took to export LFM3 to ExecuTorch (open source app) — retained record

> Retained reddit record from reddit:LocalLLaMA.

Canonical: https://highsignal.app/data/records/6e03bc58963b06b5

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:LocalLLaMA)  published 2026-10-30 11:14 ingested 2026-10-31 02:40

[original source ↗](https://www.reddit.com/r/LocalLLaMA/comments/1xjcipv/lfm317b_and_lfm3vl2b_running_fully_offline_on/)

## retained text



```
LFM3 is now in Private Mind, our open source app for running models locally on iOS and Android. In the video, LFM3-VL-2B reads a Japanese ramen menu: asked what to order without spice, it skips the bowl marked 激辛 (extra spicy) and picks the miso ramen; asked about paying by card, it finds the "cash only" line under the prices.

Numbers on an iPhone 16 Pro:

* LFM3-1.7B (text), MLX 4-bit on the GPU: \~40 tok/s, first token under 0.5 s
* LFM3-VL-2B with a photo: \~9 s to the first token, \~20 tok/s decode. A text follow-up in the same chat starts in \~5 s

**Exporting LFM3 to ExecuTorch**

LFM3 isn't LFM2 with more parameters, and ExecuTorch's existing LFM2 export doesn't cover it. The new pieces:

* 24 layers mixing gated short convolutions (width 7), full attention and sliding-window attention (window 256)
* a sigmoid gate on every attention head's output, and RMSNorm on Q and K
* different RoPE per layer type: full attention rotates only half the head dims with theta 1e6, sliding layers use theta 1e4
* sandwich norms around every block

So I rewrote the decoder in plain PyTorch for export and checked it against Liquid's reference implementation: max logit difference 0.00005, same top 10 tokens.

The part I liked most is the sliding-window cache. ExecuTorch's built-in ring-buffer cache is sized at 2x the window, which caps a single forward call at 512 tokens, so a long prompt has to be fed in small pieces. I gave the sliding layers a buffer of window + 2048 and let the attention mask enforce the 256-token window, so one call can take 2048 tokens and the context still goes to 8192.

Two builds came out of it: MLX 4-bit for the Apple GPU (1.07 GB) and XNNPACK 8da4w for CPU on iOS and Android (1.17 GB).

The LFM3 exports are on Hugging Face: [https://huggingface.co/software-mansion/LFM3-ExecuTorch](https://huggingface.co/software-mansion/LFM3-ExecuTorch)
```



document fetched 2026-10-31 00:45 · canonical https://reddit.com/r/LocalLLaMA/comments/1xjcipv/lfm317b_and_lfm3vl2b_running_fully_offline_on
