AI agents · OpenClaw · self-hosting · automation

Quick Answer

Best On-Device LLM Runtimes for Mobile and Desktop Apps 2026

Published:

The short answer

Pick the runtime by the platform you ship on first, then by the model format you already have. The best on-device LLM runtimes, as of October 28, 2026 (versions and licences from each project’s GitHub page):

RuntimeLicence / versionPlatformsAccelerationModel formatBest for
llama.cppMIT; daily builds (b11946, Oct 28)macOS, Linux, Windows, iOS, AndroidCPU, Metal, CUDA, Vulkan and moreGGUFCross-platform apps, widest model support
LiteRT-LM (Google)Apache 2.0; v0.18.1 (Oct 20)Android, iOS, web, desktop, IoTGPU, NPU.litertlmAndroid apps; Gemma models
ExecuTorch (PyTorch)BSD; v1.5.1 (Sep 23)iOS, Android, embedded, desktopCPU, GPU, NPU, DSP via backend delegates.pteTeams with PyTorch models and vendor NPUs
MLX LM (Apple)MIT; v0.32.2 (Oct 16)Apple silicon MacsApple GPU via MLXMLX safetensorsMac apps and local fine-tuning
ONNX Runtime GenAI (Microsoft)MIT; v0.17.0 (Sep 28)Windows, Linux, Mac, Android, iOSCUDA, DirectML, QNN, OpenVINO, WebGPUONNXWindows apps, Copilot+ PCs
MLC LLMApache 2.0iOS, Android, web, desktopMetal, Vulkan, CUDA, WebGPUCompiled MLCWebGPU in the browser

Runtime notes

llama.cpp is the safe default: about 132,600 GitHub stars, new builds several times a day and day-one support for most open-weight releases in GGUF. Ollama and LM Studio build on it, so a model that runs in those desktop apps usually runs in your own llama.cpp integration. The trade-off is limited NPU use.

LiteRT-LM is Google’s production layer for LLMs on LiteRT, the runtime behind on-device generative features in Chrome, Chromebook Plus and Pixel Watch. Version 0.18 added EmbeddingGemma 2 multimodal embeddings, an OpenAI-compatible /v1/embeddings endpoint in litert-lm serve and on-demand KV-cache growth on NPU. It has Kotlin, Swift, JavaScript, Python and C++ APIs, function calling, and vision and audio inputs.

ExecuTorch exports a PyTorch model once with torch.export and produces a backend-specific .pte file per target, delegating supported graph regions to the device’s accelerators. Selective builds keep only the operators you need, which keeps app size down. Its versioning contract guarantees a .pte built on stable APIs loads on at least the next non-patch runtime release.

MLX LM generates text and fine-tunes models on Apple silicon, including LoRA and full fine-tuning on quantized models, with thousands of Hugging Face models one command away. It is a Mac tool: for iPhone apps use llama.cpp, LiteRT-LM, ExecuTorch or Apple’s own Foundation Models framework.

ONNX Runtime GenAI handles tokenization, sampling, KV cache and constrained decoding for tool calling on top of ONNX Runtime, and powers Foundry Local, Windows ML and the VS Code AI Toolkit. It is the most direct route to Qualcomm NPUs on Windows on Arm.

MLC LLM compiles models for each target and is the most mature option for running a model in the browser on WebGPU.

How to choose

  • One codebase for iOS, Android and desktop: llama.cpp with a GGUF model.
  • Android-first, battery matters: LiteRT-LM on GPU or NPU.
  • Custom PyTorch model, specific phone chips: ExecuTorch with the vendor backend.
  • Mac-only app or local fine-tuning: MLX LM.
  • Windows desktop app: ONNX Runtime GenAI or Foundry Local.
  • Runs in a web page: MLC LLM (WebLLM) or LiteRT-LM’s web build.

Then pick a model that fits the memory budget. New small models land often: Liquid AI’s LFM3 family ships GGUF, MLX and ONNX builds, and the 1.7B text model needs about 1 GB at 4-bit. For model rankings see best on-device AI models; for Apple’s own stack see Apple Core AI vs Foundation Models vs MLX.

What to test before you ship

  1. Time to first token and tokens per second on your lowest supported device, not your development machine.
  2. Peak memory, including the KV cache at your longest context; the OS will kill an app that exceeds it.
  3. App size after bundling the runtime and the model, or a download-on-first-run flow.
  4. Thermal throttling over a 10-minute session.
  5. Licences of both runtime and model — runtimes here are permissive, but model licences vary.

Last verified: October 28, 2026.

Sources