Running LFM3 offline on mobile with ExecuTorch export
Export LFM3-1.7B and LFM3-VL-2B models to ExecuTorch to run them completely offline on iPhone and Android. Tests show LFM3-VL-2B can read a Japanese ramen menu offline and accurately answer questions about spice levels and payment methods.
Reddit r/LocalLLaMA/u/K4anan
ExecuTorchPyTorchPrivate MindHugging FaceMLXXNNPACK
Added 2026-10-31 · originally published 2026-10-30
Steps
- 1Rewrite the decoder in PyTorch, introducing gated short convolutions, full attention, sliding-window attention, sigmoid gates, and RMSNorm structures, and align them with the Liquid reference implementation.
- 2Set up a window + 2048 buffer for the sliding layers and enforce a 256-token window via attention mask, allowing a single call to process 2048 tokens with a context length of up to 8192.
- 3Export the MLX 4-bit version for Apple GPU (1.07 GB in size), or export the XNNPACK 8da4w version for iOS and Android CPUs (1.17 GB in size).
- 4Deploy the exported LFM3 model to the open-source application Private Mind to achieve fully offline execution on mobile devices.
Copy-ready prompt
Please refer to the architectural features of the LFM3 model (including 24 layers of hybrid gated short convolutions, full attention, sliding-window attention, and sigmoid gates) to help me write a piece of PyTorch code for [enter export requirements or framework] to accomplish [specific export or model optimization task].
#Edge AI#Model Export#ExecuTorch#Offline Execution
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.