Mursalin
  • Home
  • About
  • Projects
  • Growth
  • Pricing
  • Blog
  • Contact
Sign In
Visit Store
Hire Me
  • Home
  • About
  • Projects
  • Growth
  • Pricing
  • Blog
  • Contact
  • Visit StoreHire Me
  • Sign In
Mursalin

Freelance AI product developer building AI agent SaaS, AI-powered mobile apps, and MVPs for clients worldwide — from Rajshahi, Bangladesh.

Rajshahi, Bangladesh · UTC+6

hello@mursalinsdesk.comWhatsApp +880 1738 753102

GitHubX (Twitter)LinkedInWhatsApp

Navigation

  • Home→
  • About→
  • Services→
  • Pricing→
  • Projects→
  • Hire Me→
  • Blog→
  • Store→
  • Contact→

Services

  • AI Agent SaaS Products→
  • AI-Powered Mobile Apps→
  • MVP Development→
  • AI Integration & Automation→
  • Full-Stack Web & SaaS Platforms→
  • AI Strategy & Fractional CTO→

Get in Touch

hello@mursalinsdesk.comBook a Call

© 2026 Mursalin's Desk. All rights reserved.

Privacy PolicyTerms of Service
Running LLMs On-Device in React Native (Expo): What Actually Works in 2026
AI EngineeringMobile

Running LLMs On-Device in React Native (Expo): What Actually Works in 2026

On-device AI in React Native is production-ready in 2026 for 1-4B models. Here is which libraries work in Expo, what phones can run, and when to stay in the cloud.

Md. Emamul Mursalin

By Md. Emamul Mursalin

September 9, 2026·Updated Sep 9, 2026·11 min read
Share

On-device AI React Native is genuinely production-ready in 2026 for a specific slice of use cases: 1-4 billion parameter models on phones from the last two or three years, doing summarization, classification, short-form generation, and offline assistants. It is not a replacement for cloud models on hard reasoning tasks, and the developer experience still has sharp edges. I am Md. Emamul Mursalin, a freelance AI product developer in Rajshahi, Bangladesh, and I ship React Native apps with Expo for remote clients. This is what actually works right now, what does not, and the code to get started. ## Why run a model on the phone at all Before the how, the why. Four reasons a client asks me for on-device inference, in the order I hear them: - **Privacy.** Health, journaling, legal, and finance apps where user text should never leave the device. This is the strongest reason and often a selling point in the store listing. - **Offline.** Field workers, travelers, and users in markets with unreliable data. My own region is a good test bed for this. - **Zero marginal cost.** No per-token API bill. For a free app with a million users, this is the difference between a viable product and a bankruptcy. - **Latency.** Sub-100ms time to first token on a modern iPhone feels different from a network round trip, especially for autocomplete-style features. The reason not to: quality. A 1-3B model on a phone is roughly GPT-3.5 class at best. If your feature needs the reasoning of a frontier model, stay in the cloud and read my [AI mobile app cost guide](/blog/ai-mobile-app-development-cost-react-native) for how to budget that instead. ## The 2026 platform baseline The ground has shifted in the last year, and it matters for which libraries you can use. - **Expo SDK 56** (released May 2026) runs on React Native 0.85. From SDK 55 onward the New Architecture is always enabled and cannot be turned off. Every on-device library worth using now targets it. - **iOS 26** shipped Apple's Foundation Models framework: direct developer access to the ~3B on-device model behind Apple Intelligence, running on the Neural Engine with no download and no API key. - **Android** exposes Gemini Nano through the ML Kit GenAI APIs on AICore-capable devices (Pixel, recent Samsung, Xiaomi, Motorola flagships), covering prompt, summarization, proofreading, rewriting, and image description. The practical consequence: on Apple's newer devices you can use the system model for free, on high-end Android you can sometimes use Gemini Nano, and everywhere else you ship your own model file. ## The libraries that work in Expo I have tried most of the options. This is the shortlist I would actually build a client project on in September 2026. | Library | Runtime | Models | Expo support | Best for | |---|---|---|---|---| | react-native-executorch (Software Mansion) | Meta ExecuTorch | Llama 3.2 1B/3B, Qwen, Phi, plus vision, speech, OCR, embeddings | Yes, SDK 54+, via config plugin and dev client | Cross-platform apps that want React hooks and a curated model catalog | | llama.rn | llama.cpp | Any GGUF from Hugging Face | Yes, with a dev client (not Expo Go) | Maximum model choice; Metal acceleration on iOS | | @react-native-ai/apple (Callstack) | Apple Foundation Models | Apple's system model, iOS 26+ | Yes, New Architecture required | Free, zero-download iOS inference through the Vercel AI SDK interface | | Gemini Nano via ML Kit | Android AICore | Gemini Nano | Needs a native module; no widely adopted Expo package yet | Android-only features on flagship devices | A few honest notes on each. **react-native-executorch** is where I start for most projects. The API is a set of hooks (`useLLM`, `useSpeechToText`, `useOCR`, and so on), models are downloaded and cached on first use, and the same code runs on iOS and Android. The trade-off is that you are limited to the exported model catalog unless you convert your own `.pte` files, which is a real ML task. Versions have changed hook signatures more than once, so pin your version and read the changelog. **llama.rn** is the escape hatch. It binds llama.cpp directly, so any GGUF model works, and it is actively maintained (0.13 release candidates were landing in September 2026). Quantized 4-bit models in the 1-3B range give sub-100ms time to first token on recent iPhones. The cost is a lower-level API: you manage context, tokens, and memory yourself. **@react-native-ai/apple** is the one to watch. It exposes Apple's on-device model as a provider for the Vercel AI SDK, so `generateText` and `streamText` work with no network. Text generation, embeddings, transcription, and speech synthesis are covered. It requires iOS 26 and an Apple Intelligence capable device, so you still need a fallback for older iPhones. **Gemini Nano** is great when it is available, but in React Native it currently means writing or adopting a native module around the ML Kit GenAI APIs. I treat it as an optional enhancement, not a baseline. ## A minimal Expo example Here is the shape of an on-device chat feature with react-native-executorch. The exact hook options have changed across releases, so treat this as the pattern rather than copy-paste; check the current docs for the model constant names and the generate or send method for your version. ```tsx // app/(tabs)/assistant.tsx import { useState } from 'react'; import { View, TextInput, Text, Pressable } from 'react-native'; import { useLLM, LLAMA3_2_1B } from 'react-native-executorch'; const MAX_PROMPT_CHARS = 2000; export default function Assistant() { const llm = useLLM({ model: LLAMA3_2_1B }); const [prompt, setPrompt] = useState(''); const isBusy = !llm.isReady || llm.isGenerating; const handleSend = async () => { if (isBusy || prompt.trim().length === 0) return; await llm.generate(prompt.slice(0, MAX_PROMPT_CHARS)); }; if (!llm.isReady) { return Downloading model: {Math.round(llm.downloadProgress * 100)}%; } return ( {llm.isGenerating ? 'Thinking' : 'Send'} {llm.response} ); } ``` Three things to notice. The model download is a first-run experience you have to design, because a 1B model is around 1 GB and users will not wait on cellular. There is no API key anywhere, which is the point. And prompt length is capped, because context windows on device are small and long prompts are slow. You will need an Expo development build (`npx expo run:ios` or EAS Build), not Expo Go, since these libraries include native code. Add the library's config plugin to `app.json` and rebuild. ## What phones can actually run Benchmarks from vendor blogs are optimistic. From my own testing and from published 2026 numbers, a reasonable planning table: - **iPhone 15 Pro and newer, Snapdragon 8 Gen 3 and newer:** 1-3B models run comfortably, 15-30 tokens per second, usable for chat. - **iPhone 13-14, mid-range Android from 2023-2024:** 1B models are fine, 3B is borderline; expect slower generation and thermal throttling after a minute. - **Older or budget devices:** stick to classification, embeddings, and speech-to-text with small models; skip generative text. Memory is the real constraint. A 3B model at 4-bit quantization needs roughly 2 GB of RAM while running, and iOS will terminate your app if you push too hard. Always check available memory and fall back to a smaller model or the cloud. ## The hybrid pattern I ship Pure on-device is rare in my client work. What I usually build is a router: 1. If the task is short and private (summarize this note, classify this message, suggest a reply), run on device. 2. If the device supports Apple Foundation Models or Gemini Nano, use the system model first: no download, no memory cost. 3. If the task needs real reasoning, long context, or tools, send it to a backend that calls a cloud model, with the user's consent shown in the UI. 4. If there is no network, degrade to on-device or queue the request. This gives users the privacy and speed of local inference for 70-80% of interactions while keeping quality high where it matters. It also keeps the API bill small, which is a tangible business outcome, not just an engineering nicety. The [Iqtidah Sunnah Tracker](/projects/iqtidah-sunnah-tracker), a React Native app I built, follows the same principle of keeping the on-device surface small and dependable. ## Checklist before you ship an on-device feature - [ ] Model download happens on Wi-Fi with a clear progress screen and a skip option - [ ] A memory check gates model size; fall back to a smaller model or cloud - [ ] Prompt length and output length are capped - [ ] Generation is cancelable and runs off the JS thread (all listed libraries do this) - [ ] Thermal and battery impact tested for a five-minute session on a mid-range device - [ ] Output is evaluated against a small test set; small models hallucinate more, not less - [ ] The store listing says what runs locally and what, if anything, goes to a server - [ ] App size and download size reviewed; consider downloading the model post-install rather than bundling it ## What does not work yet To keep this honest: tool calling on device is immature outside Apple's framework; fine-tuning a model for your app is possible but is a separate ML project most startups should not take on; and running anything above 4B parameters on a phone is a demo, not a product. Expo Go cannot run any of these libraries. And Android fragmentation means you will be testing on more physical devices than you planned. ## On-device AI React Native: the verdict On-device AI React Native works in 2026 if you scope it correctly: 1-3B models through react-native-executorch or llama.rn for cross-platform, Apple Foundation Models on iOS 26 devices for free system inference, and a cloud fallback for anything that needs a frontier model. Design the download, cap the prompts, test on mid-range hardware, and route intelligently between device and cloud. Done that way, it is a real product advantage on privacy, cost, and speed. ## FAQ ### Can AI run on device in a React Native app without internet? Yes. Libraries like react-native-executorch and llama.rn run 1-3B parameter models entirely on the phone with no network. On iOS 26, Apple's Foundation Models framework provides a system model with no download. Expect GPT-3.5 class quality, plan a first-run model download over Wi-Fi, and keep a cloud fallback for harder tasks. ### Is React Native good for AI apps? It is a strong choice. React Native with Expo gives one codebase for both stores, and the on-device ecosystem (ExecuTorch, llama.cpp bindings, Apple and Google system models) is now accessible through React hooks and the Vercel AI SDK. The AI logic is the same as in a native app; you just write it once. ### Should I use Expo or bare React Native for on-device AI? Expo, using a development build rather than Expo Go. Expo SDK 56 on React Native 0.85 with the New Architecture supports every library in this guide through config plugins, and EAS Build handles the native compilation. Bare React Native adds maintenance without adding capability for this use case. ### How big are on-device LLM models? A 1B parameter model quantized to 4-bit is roughly 0.7-1 GB on disk; a 3B model is 1.8-2.5 GB and needs about 2 GB of RAM while running. Download models after install rather than bundling them, and gate model size on device memory. Apple's and Google's system models take no app storage at all. ### How do I add voice AI to a mobile app? On device, react-native-executorch provides speech-to-text with Whisper-family models and Apple's framework covers transcription and speech synthesis on iOS 26. Pipe the transcript into a local LLM for short tasks or to a cloud model through your backend for complex ones. Latency is the design constraint; stream everything and show partial results. ## Work with me If you want an AI-powered mobile app with on-device inference done properly, [book a call](/appointments) or [start a professional-tier build](/contact?service=ai-mobile-apps&tier=professional). The scope of that tier is on the [AI mobile apps professional page](/services/ai-mobile-apps-professional), pricing is on the [mobile apps pricing section](/pricing#ai-mobile-apps), and my remote working setup from Bangladesh is on the [React Native developer page](/hire/react-native-developer-bangladesh).

#LLM#React Native#Expo#On Device AI#ExecuTorch

Related services

If this article describes something you need built, these are the packages that cover it.

  • AI Integration & AutomationRAG over your data and automated workflows, from $799.
  • AI Agent SaaS ProductsMulti-tenant agent products with billing, from $1,499.

Building something like this?

I'm a freelance AI product developer in Rajshahi, Bangladesh, working remotely with clients worldwide. A free 30-minute call is enough to scope it.

Book a free 30-min call
← All Posts
Share

Related Articles

Do You Need a CTO for Your AI Startup? A Decision Checklist for Non-Technical Founders
Sep 9, 2026·10 min read

Do You Need a CTO for Your AI Startup? A Decision Checklist for Non-Technical Founders

Most pre-seed AI startups do not need a full-time CTO. They need someone senior to make five decisions correctly. Here is how to tell which one you are.

AI EngineeringHiring Guides
Md. Emamul MursalinMd. Emamul Mursalin
Read →
How I Build Multi-Tenant AI Agent SaaS With Next.js, NestJS and Stripe
Sep 9, 2026·11 min read

How I Build Multi-Tenant AI Agent SaaS With Next.js, NestJS and Stripe

The exact architecture I use for multi-tenant AI agent SaaS: tenant isolation in NestJS and Prisma, per-tenant token budgets, and Stripe usage billing. With code.

AI EngineeringSaaS
Md. Emamul MursalinMd. Emamul Mursalin
Read →
How Much Does an AI-Powered Mobile App Cost in 2026? React Native Rates, Bangladesh vs US
Sep 9, 2026·10 min read

How Much Does an AI-Powered Mobile App Cost in 2026? React Native Rates, Bangladesh vs US

An AI-powered React Native app costs $4k-15k from a senior Bangladeshi developer and $40k-150k from a US agency in 2026. Here is where the money goes.

AI EngineeringMobile
Md. Emamul MursalinMd. Emamul Mursalin
Read →