WhoBuilt

React Native AI: Bringing On-Device LLMs With AI SDK

Oct 3, 2025· 19 min· 2.9K views·Watch on YouTube

Speaker

Szymon Rybczak, senior engineer at Callstack, presents on running on-device LLMs in React Native with the AI SDK at the first AI Meetup in Wrocław, organized with Vercel.

Why run AI on the device

Rybczak describes on-device models as a way to avoid API costs and keep private data on the user’s device. They can respond quickly, work offline, and avoid dependence on an available network service.

Connecting React Native to local models

Rybczak wanted to run LLMs on phones through React Native without requiring app developers to become C++ specialists. He combined the AI SDK’s provider interface with the MLC engine, then demonstrated a downloaded model answering a question in airplane mode. That setup needed a large download, a recent device, and about 4 GB of RAM.

Bringing Apple’s built-in model to React Native

After Apple announced its Foundation Models framework at WWDC 2025, Rybczak and Callstack colleagues connected it to React Native. Their proof of concept used the AI SDK’s `generateText` and React Native AI, and was working within 24 hours of the announcement. The model answered quickly offline; Rybczak said its underlying model details were not officially known.

What the demos and package support

Rybczak demonstrated streaming responses, structured output using Zod schemas converted to Swift types, and offline speech-to-text and text-to-speech. He also described tool calling, including the possibility of invoking native modules, and embeddings. He noted that speech recognition was less capable than Whisper in their testing.

Roadmap and community work

The team had marked Apple on-device features for the iOS 26 launch as done and planned Android support using Gemini Nano, Gemini Edge, ExecuTorch, and MLC. Its goal was feature parity with the AI SDK across those engines. Rybczak credited Callstack colleagues and others who contributed to the package.

Takeaways

  • On-device inference can reduce API costs and keep sensitive user data local, while enabling offline use.
  • A provider interface can connect a shared AI API to different inference engines and native platform models.
  • Account for model download size, device compatibility, and memory use when choosing a third-party on-device model.
  • Structured output can bridge typed JavaScript schemas and native Swift types.
  • Native capabilities such as speech and tool calling can extend an LLM feature beyond text generation.

Mentioned in this talk

Search inside this talk

What was claimed 11

Show all 11 facts

Related talks