Data as of Aug 25, 2026 · Based on 40 AI responses from ChatGPT Search and Google AI Mode · See how Parse measures this
Your brand can be here too.
There is no single "best" framework because the right choice depends on your target platforms, your chosen model architecture, and how deeply you want to optimize hardware acceleration.
The top-tier frameworks for running LLMs on-device break down as follows, categorized by their strengths:
- **Platforms:** Cross-platform (iOS, Android, macOS, Linux, Windows).
- **Why choose it:** It is the de facto standard for running quantized GGUF models locally. It supports almost every major open-source architecture (Llama, Mistral, Gemma, Qwen) on the day they release. It runs exceptionally well on CPU and leverages Metal (iOS) and Vulkan/OpenCL (Android) for GPU offloading.
- **Trade-off:** Lower-level C/C++ implementation, meaning you will need a native wrapper or binding for your mobile app stack.[[1]](https://meetprajapati.com/blogs/running-on-device-ai-models-android-mediapipe-llamacpp-executorch/)
- **Platforms:** Android, iOS, Web, Desktop.
- **Why choose it:** Google's MediaPipe LLM Inference Guide allows you to deploy pre-optimized models (like Gemma or Phi-2) with minimal boilerplate code. It manages memory and hardware delegation (GPU/NPU) smoothly behind a clean API.
- **Trade-off:** Less flexible if you want to run arbitrary, bleeding-edge community models that haven't been converted to Google’s preferred task format.[[1]](https://meetprajapati.com/blogs/running-on-device-ai-models-android-mediapipe-llamacpp-executorch/)
- **Platforms:** iOS, iPadOS, macOS.
- **Why choose it:** If you are building strictly for Apple devices, Apple Core ML gives you uncompromised, direct access to the Apple Neural Engine (ANE) and unified memory architecture. Performance and power efficiency on iPhone and iPad are unmatched.
- **Trade-off:** Completely useless for Android; you will need a separate cross-platform strategy or native Android stack.[[1]](https://appscale.blog/ja/blog/on-device-ai-frameworks-compared-llamacpp-mlc-onnx-mediapipe-coreml-2026)
- **Platforms:** Cross-platform (iOS, Android, WebGPU).
- **Why choose it:** Built on the Apache TVM stack, MLC LLM compiles LLMs down to native machine code optimized for specific mobile chipsets (Snapdragon, Apple Silicon, MediaTek). It offers native Swift and Java/Kotlin APIs and excels at squeezing maximum tokens-per-second out of mobile hardware.
- **Trade-off:** Compilation and build pipeline can be complex to set up and debug compared to `llama.cpp`.
- **Platforms:** Cross-platform (iOS, Android).
- **Why choose it:** Meta's ExecuTorch is designed to take models straight from PyTorch training to on-device mobile execution with strong hardware acceleration support.
- **Trade-off:** Ecosystem for mobile LLMs is still maturing compared to the battle-tested `llama.cpp`.[[1]](https://meetprajapati.com/blogs/running-on-device-ai-models-android-mediapipe-llamacpp-executorch/)
Quick Decision Matrix
To help narrow this down, tell me:
If you're building a mobile app that needs to run LLMs fully on-device, my default choice in 2026 is ExecuTorch.
| Framework | Best for | My take |
|---|---|---|
| ExecuTorch | Cross-platform production apps | ⭐ Best overall |
| llama.cpp | Maximum model/GGUF flexibility | ⭐ Best if you want simplicity/control |
| MLC LLM | High-performance GPU inference | ⭐ Excellent, especially for custom optimization |
| Core ML | iOS-only | ⭐ Best Apple-native option |
| LiteRT / MediaPipe | Android/Google ecosystem | Good, but less compelling for general LLM deployment |
Why ExecuTorch: it gives you a fairly unified runtime across Android and iOS while still exposing hardware-specific acceleration. On Android it supports XNNPACK, Vulkan, Qualcomm, MediaTek and other backends; on iOS it can use Core ML/Apple Neural Engine, MPS, or CPU.
It also has LLM-specific tooling for exporting models, quantization, tokenization, and running them through C++, Java/Kotlin, or Swift/Objective-C.
Choose llama.cpp if your priority is:
Choose MLC LLM if raw GPU-oriented performance and compiler optimization are especially important. It targets both iOS/iPadOS and Android and provides a unified inference engine with native mobile bindings.
Choose Core ML if you're iOS-only and want to exploit Apple's hardware as directly as possible. ExecuTorch's Core ML backend itself can dispatch computation across CPU, GPU, and Neural Engine.
For a new iOS + Android app, I'd probably use:
Your App
│
┌────────┴────────┐
│ │
iOS UI Android UI
│ │
└────────┬────────┘
│
LLM abstraction
│
ExecuTorch
/ \
Core ML QNN/Vulkan
Apple ANE Android GPU/NPU
I'd start with a small 1–4B instruct model, quantized appropriately for the target devices, rather than trying to cram a 7B+ model onto every phone.
One important caveat: the framework isn't usually the biggest performance decision. Model architecture, quantization, KV-cache strategy, context length, and—especially—whether you're actually hitting the phone's GPU/NPU matter enormously. ExecuTorch's own documentation emphasizes backend selection as one of the biggest determinants of performance.
If you tell me iOS, Android, or both + your target model (e.g. Llama 3.2 3B, Qwen 3 4B, Gemma 3 4B), I can give you a concrete stack and architecture I'd use for production.
There isn't one universal "best" framework — the right choice depends mostly on iOS vs Android, model choice, and whether you prioritize portability, speed, or engineering simplicity. For most mobile apps in 2026, these are the serious options.
| Your situation | Pick |
|---|---|
| Need iOS + Android, broad model support | llama.cpp |
| Need the fastest cross-platform GPU inference | MLC LLM |
| iOS-only app, maximum Apple hardware optimization | Core ML / MLX |
| Android-first app, especially Google/Silicon optimization | LiteRT / MediaPipe LLM |
| Already using PyTorch models | ExecuTorch |
| Mixed AI models (LLM + vision + audio) | ONNX Runtime Mobile |
AppScale Blog RunLocalAI## My default choices
llama.cpp is usually the safest starting point.
Pros
Cons
Use it if you want:
MLC LLM takes models through a compilation pipeline and generates optimized code for targets like Metal and Vulkan.
Pros
Cons
Use it when:
For Apple platforms, native frameworks can win because they can access Apple's optimized hardware stack.
Apple's Core ML can use CPU, GPU, and Neural Engine paths when models convert cleanly.
Pros
Cons
A common production approach is:
LiteRT (formerly TensorFlow Lite) and Google's LLM tooling are attractive if Android is your main target.
Pros
Cons
For mobile, the biggest decisions are usually:
AppScale BlogIf I were starting a new cross-platform mobile app today, I'd prototype with llama.cpp first, then benchmark MLC LLM if latency becomes a problem. For an iOS-only product, I'd evaluate Core ML early because the hardware integration can be worth the extra conversion work.
The best framework for running Large Language Models (LLMs) on-device depends heavily on your target operating system and existing tech stack . There is no single "one-size-fits-all" winner, but llama.cpp stands out as the overall community favorite for cross-platform flexibility, while Meta's ExecuTorch is leading production-grade optimization for mainstream apps.
Framework Comparison Matrix
| Framework | Best For | Pros | Cons |
|---|---|---|---|
| llama.cpp | Cross-platform flexibility & fast deployment | Massive community, supports .gguf , very active updates. | Requires manual C++ wrapping for native mobile UI. |
| ExecuTorch | PyTorch/Meta ecosystems & production reliability | Deep NPU acceleration, native PyTorch compatibility. | Higher learning curve; compilation steps are complex. |
| MLC LLM | Maximizing raw hardware speed via GPU | Built-in Android/iOS SDKs, highly optimized compiler. | Harder to customize models outside of supported architectures. |
| MLX Swift | Apple-only (iOS / iPadOS) development | Tailored for Apple Silicon, incredibly fast tokens/sec. | Complete lack of Android support. |
| ONNX Runtime | Traditional enterprise cross-platform mobile apps | Exceptional React Native/Flutter support. | Ecosystem for LLMs is less mature than llama.cpp. |
🏆 The Top Frameworks Broken Down
If you want to support a massive range of open-source models out of the box, use llama.cpp . It utilizes .gguf quantization, making it incredibly lightweight on memory.
Backed by Meta, ExecuTorch is designed specifically to handle on-device AI deployment on mobile and edge devices. It specializes in mapping heavy math onto phone Neural Processing Units (NPUs).
MLC LLM compiles models directly to native code using the Apache TVM compiler. It cuts down boilerplate code by providing native Android (Java/Kotlin) and iOS (Swift) SDKs directly.
If your app is exclusively targeting iOS, MLX Swift (via MLX Swift LM) is the fastest option available. Created by Apple's machine learning research arm, it optimizes tensor operations exclusively for Apple Silicon.
⚠️ Reality Check: Crucial Hardware Constraints
Keep in mind that running local models on smartphones introduces aggressive bottlenecks:
ExecuTorch to reduce this overhead.If you would like to narrow this down, let me know:
If you mean a production mobile app that runs an LLM fully on-device on both iOS and Android, my pick in 2026 is PyTorch ExecuTorch.
| Framework | iOS + Android | Best for | My take |
|---|---|---|---|
| ExecuTorch | ✅ | Production on-device LLMs | Best overall |
| llama.cpp | ✅ | Maximum portability / GGUF | Best if you want simplicity & model flexibility |
| LiteRT | ✅ | Google's ecosystem / broad ML | Strong alternative |
| Core ML | iOS only | Apple-native apps | Best for iOS-only |
| MLX | Apple platforms | Apple Silicon research/dev | Excellent, but not the cross-platform mobile choice |
It has become particularly compelling for mobile because it isn't merely an inference engine—it provides an export → quantize → hardware-accelerate → deploy pipeline. Its current LLM tooling supports models such as Llama, Gemma, Qwen, Phi and others, with Android and iOS bindings.
The big advantage is hardware coverage:
That makes it substantially more attractive than building around a CPU-oriented runtime if you're expecting to optimize for different generations of phones.
llama.cpp is still arguably the easiest choice if your priority is:
The tradeoff is that ExecuTorch gives you a more structured path toward device-specific NPU/GPU acceleration, whereas llama.cpp is especially attractive when portability and model availability matter more.
I'd seriously consider Apple's Core ML / Foundation Models stack rather than adding a cross-platform runtime. You get much tighter integration with Apple's hardware and OS.
For something like:
React Native/Flutter app + local 1–4B model + iPhone and Android support
I'd architect it roughly as:
LLM → quantization → ExecuTorch .pte → native iOS/Android runtime → thin bridge to React Native/Flutter
rather than trying to run the model through the cross-platform UI layer itself.
One important caveat: model size and quantization matter at least as much as the framework. A well-quantized 1–3B model that fits comfortably in RAM will generally make for a much better mobile product than trying to cram a 7–14B model onto arbitrary phones. ExecuTorch's own Qualcomm example currently demonstrates a 3B Llama deployment and highlights quantization specifically to reduce memory pressure.
Bottom line:
Cross-platform production → ExecuTorch.
Maximum model/runtime portability → llama.cpp.
iOS-only → Core ML/Apple's native stack.
If you tell me iOS only vs. iOS + Android, your app framework (Swift/Kotlin/Flutter/React Native), and the model you're considering (e.g. Llama 3.2 3B, Qwen 3, Gemma 3), I can give you a concrete recommendation and architecture.
There is no single "best" framework —the right choice depends entirely on your target platforms, whether you want an out-of-the-box model or a bring-your-own-model workflow, and your team's native vs. cross-platform stack.
The top on-device LLM frameworks break down by use-case and architecture:
.gguf models on CPU, GPU, and mobile hardware.mmap ), and easily wrapped via FFI for React Native, Flutter, or native code..mlpackage formats.To help narrow down the ideal framework, tell me:
The best framework for running LLMs on-device depends heavily on your target platform and performance requirements, but llama.cpp (via NDK/JNI or native wrappers) is widely considered the overall industry standard for cross-platform efficiency, while MLC-LLM (Machine Learning Compilation) and MediaPipe (Google AI Edge) lead for streamlined native integration.
For Apple-exclusive applications, MLX and Apple’s native Core ML provide the tightest hardware optimization against the Neural Engine.
| Framework | Best Platform | Core Advantage | Primary Limitation |
|---|---|---|---|
| llama.cpp | Cross-Platform (iOS/Android) | Maximum hardware compatibility, highly optimized GGUF quantized models. | Steeper manual NDK/JNI setup curve. |
| MLC-LLM | Cross-Platform | Compiles models via TVM to native GPU/NPU acceleration. | Setup and compilation pipeline complexity. |
| MediaPipe LLM Inference | Android / Cross-Platform | Easy high-level APIs, built-in task support (text, vision, RAG). | Less low-level engine customization than llama.cpp. |
| MLX Swift / MLX | iOS / macOS Only | Blazing fast execution built directly for Apple Silicon unified memory. | Restricted entirely to Apple devices. |
Choosing Your Framework Strategy
Q4_K_M ) to balance memory footprint and token generation speeds.If you can share your target platform (iOS, Android, or cross-platform like React Native/Flutter) and the size of the model you want to run (e.g., 1B, 3B, or 7B parameters), I can recommend a specific deployment architecture or quantization level.
If you mean shipping an LLM inside a production iOS/Android app, my default choice in 2026 is Google’s LiteRT-LM—with a couple of important exceptions.
| Framework | Best for | My take |
|---|---|---|
| LiteRT-LM | Cross-platform production mobile apps | Best default |
| ExecuTorch | PyTorch-heavy teams / custom models | Excellent alternative |
| MLC LLM | Maximum control & compiled performance | Very strong |
| llama.cpp | Broad model compatibility / GGUF | Best low-level/portable option |
| MediaPipe LLM | Simple Android/iOS integrations | Easiest, but less flexible |
Why LiteRT-LM? Google has evolved its on-device stack substantially: LiteRT is now a production runtime for hardware-accelerated inference, while LiteRT-LM adds the LLM-specific orchestration layer. It supports Android and iOS, with GPU acceleration on both and NPU support on Android.
Google is also explicitly positioning LiteRT-LM for cross-platform LLM deployment, including multimodality and tool use, rather than merely basic text generation.
Choose ExecuTorch if your models originate in PyTorch and you want a clean path from training/export → mobile deployment. It has first-class Android and iOS paths and supports backends including XNNPACK, Vulkan, Core ML and MPS. Meta is also using it in production across Instagram, WhatsApp, Messenger and Facebook.
Choose MLC LLM if you're comfortable with a compiler-oriented stack and want substantial control over model compilation and hardware optimization. It provides native iOS and Android SDKs and an OpenAI-compatible API.
Choose llama.cpp if your overriding requirement is "I want to run as many different open models as possible." Its GGUF ecosystem and portability are hard to beat, although you'll generally be doing more of the integration/hardware-optimization work yourself.
Choose MediaPipe's LLM API if you want the shortest path to something like "put a small Gemma model into my Android/iOS app and generate text." Google provides an LLM Inference API specifically for mobile, including Android and iOS.
For a new cross-platform app today:
App
→ LiteRT-LM
→ quantized 1–4B model
→ GPU/NPU where available
→ CPU fallback
→ optional cloud fallback for tasks that exceed the device
I'd start with Gemma, Qwen, or Phi-class small models, benchmark 1B–4B variants on your actual target phones, and avoid choosing the framework solely from desktop benchmark numbers. LiteRT currently has pre-optimized support for models including Gemma, Qwen and Phi.
One particularly important consideration is whether you're targeting iOS only, Android only, or both. If you tell me your platform (iOS/Android/both), model size (e.g. 1B/3B/7B), and whether you're using Swift/Kotlin/Flutter/React Native, I can recommend the specific stack and model I'd use.
If you mean a production mobile app that runs an LLM locally on both iOS and Android, my default choice in 2026 is LiteRT + LiteRT-LM. Google has moved beyond the old TensorFlow Lite stack, and LiteRT now has first-class GPU acceleration across Android and iOS, with NPU support on Android. LiteRT-LM adds the LLM-specific runtime/orchestration layer, including streaming, tool calling, multimodality, and support for models such as Gemma, Llama, Phi, and Qwen.
| Framework | Best for | My take |
|---|---|---|
| LiteRT-LM | Cross-platform production apps | Best overall |
| ExecuTorch | PyTorch-heavy teams / custom models | Best alternative |
| llama.cpp | Maximum model/GGUF flexibility | Excellent, but more DIY |
| MediaPipe LLM API | Simple Gemma-based mobile integration | Easiest Google path, less flexible |
| MLX | Apple-only apps/research | Great on Apple Silicon, not cross-platform |
Why LiteRT-LM: it is explicitly designed as a production LLM runtime across Android and iOS, with hardware acceleration and a growing set of model architectures. Current documentation shows GPU execution on both platforms and NPU acceleration on Android.
ExecuTorch is the one I'd seriously consider instead if your model pipeline is already PyTorch-based. It has native Android and iOS paths, with XNNPACK/Vulkan on Android and Core ML/MPS/XNNPACK on iOS, and provides dedicated LLM export/quantization tooling.
For a React Native app, I'd lean toward ExecuTorch or llama.cpp via a native bridge, rather than trying to make the high-level Google APIs fit awkwardly into RN. There are already React Native ExecuTorch integrations in the ecosystem.
Mobile app
│
├── Native UI / React Native / Flutter
│
└── Native LLM layer
│
├── LiteRT-LM
│ ├── GPU/NPU acceleration
│ ├── quantized model
│ ├── tokenizer
│ └── KV cache
│
└── Model
└── Gemma / Llama / Qwen / Phi
I'd target roughly 1–4B parameter models for broad phone compatibility, quantized appropriately. Larger 7–8B models can work on high-RAM modern phones, but memory pressure, thermal throttling, model download size, and OS memory limits become major product concerns. Mobile LLM research increasingly emphasizes designing models specifically around latency and memory constraints rather than simply shrinking desktop models.
One important distinction: don't choose the framework before choosing your model + minimum device spec. A 2B Q4 model with a 4K context requirement has a very different runtime profile from an 8B Q4 model with 16K context.
If you tell me iOS + Android vs one platform, native vs React Native/Flutter, and what model/use case you have in mind, I can give you a concrete stack recommendation (including model, quantization, runtime, and expected RAM/latency).
There is no single "best" framework ; the right choice depends heavily on your target platform (iOS vs. Android), your model pipeline , and whether you want a turnkey solution or low-level hardware control.
The top frameworks for running on-device LLMs in mobile apps are categorized below by their strengths:
To help narrow down the ideal choice, tell me: