A cross-platform React Native mobile application for running Vision Language Models (VLMs) locally on your device.
- iOS: Uses FastVLM (Apple's on-device VLM)
- Android: Uses Gemma (Google's on-device LLM with vision support)
- Cross-platform local AI inference (iOS & Android)
- On-device Vision Language Model execution
- Image+text prompts (image required on iOS, optional on Android)
- Real-time streaming token generation
- Privacy-focused (all processing happens locally)
- Image selection and processing with react-native-image-picker
- Automatic model download and management (Android)
- Dark theme UI with chat interface
- Message persistence with AsyncStorage
- Node.js >= 20
- React Native development environment (Setup Guide)
- For Android: Android Studio and JDK 17
- For iOS: Xcode 15+, iOS 18.2+ deployment target, MLX Swift packages
- Clone the repository
- Install dependencies:
yarn install- Install CocoaPods dependencies:
cd ios && pod install && cd ..- Download the FastVLM model using the provided script:
cd ios/LAI
./get_pretrained_mlx_model.sh --model 0.5b --dest ./FastVLM
cd ../..Available model sizes:
0.5b- 0.5B parameter model (FP16) - Fastest, smaller size1.5b- 1.5B parameter model (INT8) - Balanced7b- 7B parameter model (INT4) - Most capable, larger size
The Gemma model will be automatically downloaded on first launch.
npx react-native run-iosnpx react-native run-androidLAI/
├── android/ # Android native code (Gemma)
├── ios/ # iOS native code (FastVLM)
│ └── LAI/
│ ├── FastVLM/ # FastVLM Swift implementation
│ ├── FastVLMModule.swift # React Native bridge
│ └── FastVLMModule.m # Obj-C bridge header
├── src/
│ ├── components/ # React components
│ ├── inference/ # VLM inference APIs
│ │ ├── VLMInference.ts # Cross-platform interface
│ │ ├── FastVLMInference.ts # iOS implementation
│ │ └── GemmaInference.ts # Android implementation
│ └── utils/ # Utility functions
└── App.tsx # Main app component
- Launch the app on your device or simulator
- For iOS: Tap the camera icon to select an image (required)
- For Android: Optionally select an image with the camera icon
- Enter your prompt in the text input
- Tap Send to generate a response
- Watch the AI response stream in real-time
Tap the "Clear" button in the header to delete all messages.
Tap the "Stop" button to cancel an ongoing generation.
- React Native 0.82
- React 19
- TypeScript
- React Native FS (File system)
- React Native Image Picker
- AsyncStorage
- iOS: FastVLM (MLX Swift, CoreML)
- Android: Gemma (MediaPipe, TensorFlow Lite)
- Apple FastVLM - Apple's Fast Vision Language Model implementation
- MediaPipe LLM Inference for Android - Google's MediaPipe on-device LLM inference guide

