MiniCPM-V apps — fully offline multimodal chat on iOS / Android / HarmonyOS
388
stars
117
commits
Swift
primary language
Sep 9, 2026
updated
English | 中文
This demo runs the MiniCPM-V family of multimodal models fully on-device on iOS, Android, and HarmonyOS NEXT. Currently supported:
This repository contains three on-device demos for MiniCPM-V (multimodal LLM) running fully locally via llama.cpp:
MiniCPM-V-demo/ — iOS demo (Xcode project)MiniCPM-V-demo-Android/ — Android demo (Gradle / Kotlin)MiniCPM-V-demo-HarmonyOS/ — HarmonyOS NEXT demo (DevEco Studio / ArkTS)All three demos share the same llama.cpp-omni submodule (branch master) at the repo root.
NOTE: This project bundles
llama.cppas a git submodule. The upstream forktc-mb/llama.cpp-omnicarries a dozen unrelated branches and a full clone weighs ~350 MB, soshallow = trueis set in.gitmodulesby default. The recommended shallow + single-branch clone is:# one-shot (parent repo + submodules, all shallow) git clone --recurse-submodules --shallow-submodules \ https://github.com/OpenBMB/MiniCPM-V-Apps.git cd MiniCPM-V-AppsOr, if you've already cloned the parent repo and want to init the submodule afterwards:
git submodule update --init --recursive --depth 1 --single-branchThis only pulls a single commit of the
MiniCPM-Vbranch (~tens of MB) instead of the full llama.cpp-omni fork history. Developers who need to push totc-mb/llama.cpp-omni:mastercan rungit fetch --unshallowinside the submodule to lift the shallow restriction.
The README is organised in two parts:
Just want to install the app? Pre-built TestFlight (iOS) / APK (Android) / HAP (HarmonyOS) packages and step-by-step install instructions are in DOWNLOAD.md. The rest of this README is only needed if you want to build from source.
NOTE: To deploy and test the app on an iOS device, you may need an Apple Developer account.
Download Xcode from the App Store (verified on Xcode 26.1; project deployment target = iOS 16.4)
Install the Command Line Tools:
xcode-select --install
Agree to the software license agreement:
sudo xcodebuild -license
CMake ≥ 3.28 (needed by the xcframework build in the next step):
brew install cmake
This repo does not track any compiled artefacts, so the prebuilt llama.xcframework (~189 MB) needs to be produced locally from the llama.cpp-omni submodule and dropped into MiniCPM-V-demo/thirdparty/ for Xcode to link against. A one-shot script is provided — by default it only builds the two slices the demo actually links (real device + simulator), which takes ~2-3 min on a modern M-series Mac:
./scripts/build_xcframework.sh
The output is installed at MiniCPM-V-demo/thirdparty/llama.xcframework/.
If you need a different build scope (simulator-only, full multi-platform, …), the script forwards MINIMAL_MODE:
MINIMAL_MODE=ios-sim ./scripts/build_xcframework.sh # simulator only (~3 min)
MINIMAL_MODE=ios-device ./scripts/build_xcframework.sh # device only (~3 min)
MINIMAL_MODE=ios ./scripts/build_xcframework.sh # device + simulator (default, ~3 min)
MINIMAL_MODE=all ./scripts/build_xcframework.sh # iOS + macOS + tvOS + xrOS (~25 min)
The equivalent manual commands, if you'd rather not use the script:
cd llama.cpp-omni
MINIMAL_MODE=ios ./build-xcframework.sh
cp -r ./build-apple/llama.xcframework ../MiniCPM-V-demo/thirdparty/
During the build you will see warnings like ignoring duplicate libraries and skipping debug map object with duplicate name and timestamp — these come from llama.cpp's mtmd module having identically-named .o files across different model architectures. They are harmless and the resulting framework works correctly.
When do I need to rebuild?
- The parent repo bumped the llama.cpp-omni submodule pointer (
git submodule statusshows a commit different from your last local build).- You edited any source under
llama.cpp-omni/that affects the framework.
Open MiniCPM-V-demo/MiniCPM-V-demo.xcodeproj with Xcode. It may take a moment for Xcode to automatically download the required dependencies. Select the target device at the top, then click the "Run" (triangle) button to launch the demo.
If Xcode fails with There is no XCFramework found at '.../llama.xcframework', you skipped §1.1.2 — go back and run the build.
Requirements:
27.0.12077973 and CMake 3.22.1)arm64-v8a)Build & run:
cd MiniCPM-V-demo-Android
./gradlew assembleDebug
Or open MiniCPM-V-demo-Android/ directly in Android Studio and click Run.
The first launch will download the GGUF model files into the app's external storage. You can also sideload model files manually via adb push — see in-app Model Manager for the expected directory layout.
Requirements:
arm64-v8a)Build & run:
MiniCPM-V-demo-HarmonyOS/ in DevEco Studio.File → Project Structure → Signing Configs and tick Automatically generate signature (requires a Huawei developer account; this only needs to be done once).After the first launch, open the in-app Model Manager and tap Download. You can also sideload model files via hdc file send; see MiniCPM-V-demo-HarmonyOS/README_zh.md for the expected directory layout.
The HarmonyOS port shares the exact same
llama.cpp-omnisubmodule, model catalogue, OBS direct-link URLs and MD5 hashes with the iOS / Android demos.
The on-device memory needed to run a model is roughly (model file size) + KV cache + a few hundred MB of working memory for the vision encoder and llama.cpp internals. The recommended values below leave enough headroom for the OS and the demo app itself.
| Model | LLM params | Recommended quant | LLM file (Q4) | mmproj (f16) | Total download | Recommended device RAM |
|---|---|---|---|---|---|---|
| MiniCPM-V 2.6 | 8B | Q4_K_M | ~4.4 GB | ~1.0 GB | ~5.4 GB | ≥ 8 GB |
| MiniCPM-V 4.0 | 4.1B | Q4_K_M | ~2.0 GB | ~0.9 GB | ~2.9 GB | ≥ 6 GB |
| MiniCPM-V 4.6 | 1.3B | Q4_K_M | ~0.5 GB | ~1.1 GB | ~1.6 GB | ≥ 6 GB |
| MiniCPM5-1B | 1B | Q4_K_M | ~0.5 GB | — | ~0.5 GB | ≥ 4 GB |
| MiniCPM5-2B | 2B | Q4_K_M | ~1.5 GB | — | ~1.5 GB | ≥ 6 GB |
| VoxCPM2 (TTS) | ~2B | Q4_K_M + F16 | ~1.0 GB | — | ~2.8 GB | ≥ 6 GB |
Notes:
mmproj is the vision projector + ViT weights; it is shipped in f16 because quantising the visual tower hurts perception quality noticeably more than quantising the LLM.mmproj file.mmproj either — it is a pure TTS model.Download the language model file (e.g., ggml-model-Q4_0.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., ggml-model-Q4_K_M.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., MiniCPM-V-4_6-Q4_K_M.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., MiniCPM5-1B-Q4_K_M.gguf) from the repository. MiniCPM5 is text-only, so no mmproj is required.
Download the language model file (e.g., MiniCPM5-2B-Q4_K_M.gguf) from the repository. MiniCPM5 is text-only, so no mmproj is required.
VoxCPM2 is a ~2B-parameter text-to-speech model. It consists of two GGUF files:
VoxCPM2-BaseLM-Q4_K_M.gguf, ~956 MB) — the MiniCPM-4 based language modelVoxCPM2-Acoustic-F16.gguf, ~1.74 GB) — the acoustic decoder (FSQ + LocEnc + LocDiT + AudioVAE)VoxCPM2 supports 30+ languages and 9 Chinese dialects. It can generate speech from text directly (voice-design mode) or clone a voice from a reference audio clip.
After downloading, place both .gguf files in the app's Documents directory (iOS) or in the per-model folder under {ExternalFilesDir}/models/ (Android / HarmonyOS). You can also download them directly inside the app via Model Manager. Once models are downloaded, select VoxCPM2 and the app switches to the TTS interface automatically.
Swift
69.5%
Kotlin
14.5%
C++
7.4%
Objective-C++
3.3%
Shell
2.3%
Objective-C
1.6%
MiniCPM-V apps — fully offline multimodal chat on iOS / Android / HarmonyOS
388
stars
117
commits
Swift
primary language
Sep 9, 2026
updated
English | 中文
This demo runs the MiniCPM-V family of multimodal models fully on-device on iOS, Android, and HarmonyOS NEXT. Currently supported:
This repository contains three on-device demos for MiniCPM-V (multimodal LLM) running fully locally via llama.cpp:
MiniCPM-V-demo/ — iOS demo (Xcode project)MiniCPM-V-demo-Android/ — Android demo (Gradle / Kotlin)MiniCPM-V-demo-HarmonyOS/ — HarmonyOS NEXT demo (DevEco Studio / ArkTS)All three demos share the same llama.cpp-omni submodule (branch master) at the repo root.
NOTE: This project bundles
llama.cppas a git submodule. The upstream forktc-mb/llama.cpp-omnicarries a dozen unrelated branches and a full clone weighs ~350 MB, soshallow = trueis set in.gitmodulesby default. The recommended shallow + single-branch clone is:# one-shot (parent repo + submodules, all shallow) git clone --recurse-submodules --shallow-submodules \ https://github.com/OpenBMB/MiniCPM-V-Apps.git cd MiniCPM-V-AppsOr, if you've already cloned the parent repo and want to init the submodule afterwards:
git submodule update --init --recursive --depth 1 --single-branchThis only pulls a single commit of the
MiniCPM-Vbranch (~tens of MB) instead of the full llama.cpp-omni fork history. Developers who need to push totc-mb/llama.cpp-omni:mastercan rungit fetch --unshallowinside the submodule to lift the shallow restriction.
The README is organised in two parts:
Just want to install the app? Pre-built TestFlight (iOS) / APK (Android) / HAP (HarmonyOS) packages and step-by-step install instructions are in DOWNLOAD.md. The rest of this README is only needed if you want to build from source.
NOTE: To deploy and test the app on an iOS device, you may need an Apple Developer account.
Download Xcode from the App Store (verified on Xcode 26.1; project deployment target = iOS 16.4)
Install the Command Line Tools:
xcode-select --install
Agree to the software license agreement:
sudo xcodebuild -license
CMake ≥ 3.28 (needed by the xcframework build in the next step):
brew install cmake
This repo does not track any compiled artefacts, so the prebuilt llama.xcframework (~189 MB) needs to be produced locally from the llama.cpp-omni submodule and dropped into MiniCPM-V-demo/thirdparty/ for Xcode to link against. A one-shot script is provided — by default it only builds the two slices the demo actually links (real device + simulator), which takes ~2-3 min on a modern M-series Mac:
./scripts/build_xcframework.sh
The output is installed at MiniCPM-V-demo/thirdparty/llama.xcframework/.
If you need a different build scope (simulator-only, full multi-platform, …), the script forwards MINIMAL_MODE:
MINIMAL_MODE=ios-sim ./scripts/build_xcframework.sh # simulator only (~3 min)
MINIMAL_MODE=ios-device ./scripts/build_xcframework.sh # device only (~3 min)
MINIMAL_MODE=ios ./scripts/build_xcframework.sh # device + simulator (default, ~3 min)
MINIMAL_MODE=all ./scripts/build_xcframework.sh # iOS + macOS + tvOS + xrOS (~25 min)
The equivalent manual commands, if you'd rather not use the script:
cd llama.cpp-omni
MINIMAL_MODE=ios ./build-xcframework.sh
cp -r ./build-apple/llama.xcframework ../MiniCPM-V-demo/thirdparty/
During the build you will see warnings like ignoring duplicate libraries and skipping debug map object with duplicate name and timestamp — these come from llama.cpp's mtmd module having identically-named .o files across different model architectures. They are harmless and the resulting framework works correctly.
When do I need to rebuild?
- The parent repo bumped the llama.cpp-omni submodule pointer (
git submodule statusshows a commit different from your last local build).- You edited any source under
llama.cpp-omni/that affects the framework.
Open MiniCPM-V-demo/MiniCPM-V-demo.xcodeproj with Xcode. It may take a moment for Xcode to automatically download the required dependencies. Select the target device at the top, then click the "Run" (triangle) button to launch the demo.
If Xcode fails with There is no XCFramework found at '.../llama.xcframework', you skipped §1.1.2 — go back and run the build.
Requirements:
27.0.12077973 and CMake 3.22.1)arm64-v8a)Build & run:
cd MiniCPM-V-demo-Android
./gradlew assembleDebug
Or open MiniCPM-V-demo-Android/ directly in Android Studio and click Run.
The first launch will download the GGUF model files into the app's external storage. You can also sideload model files manually via adb push — see in-app Model Manager for the expected directory layout.
Requirements:
arm64-v8a)Build & run:
MiniCPM-V-demo-HarmonyOS/ in DevEco Studio.File → Project Structure → Signing Configs and tick Automatically generate signature (requires a Huawei developer account; this only needs to be done once).After the first launch, open the in-app Model Manager and tap Download. You can also sideload model files via hdc file send; see MiniCPM-V-demo-HarmonyOS/README_zh.md for the expected directory layout.
The HarmonyOS port shares the exact same
llama.cpp-omnisubmodule, model catalogue, OBS direct-link URLs and MD5 hashes with the iOS / Android demos.
The on-device memory needed to run a model is roughly (model file size) + KV cache + a few hundred MB of working memory for the vision encoder and llama.cpp internals. The recommended values below leave enough headroom for the OS and the demo app itself.
| Model | LLM params | Recommended quant | LLM file (Q4) | mmproj (f16) | Total download | Recommended device RAM |
|---|---|---|---|---|---|---|
| MiniCPM-V 2.6 | 8B | Q4_K_M | ~4.4 GB | ~1.0 GB | ~5.4 GB | ≥ 8 GB |
| MiniCPM-V 4.0 | 4.1B | Q4_K_M | ~2.0 GB | ~0.9 GB | ~2.9 GB | ≥ 6 GB |
| MiniCPM-V 4.6 | 1.3B | Q4_K_M | ~0.5 GB | ~1.1 GB | ~1.6 GB | ≥ 6 GB |
| MiniCPM5-1B | 1B | Q4_K_M | ~0.5 GB | — | ~0.5 GB | ≥ 4 GB |
| MiniCPM5-2B | 2B | Q4_K_M | ~1.5 GB | — | ~1.5 GB | ≥ 6 GB |
| VoxCPM2 (TTS) | ~2B | Q4_K_M + F16 | ~1.0 GB | — | ~2.8 GB | ≥ 6 GB |
Notes:
mmproj is the vision projector + ViT weights; it is shipped in f16 because quantising the visual tower hurts perception quality noticeably more than quantising the LLM.mmproj file.mmproj either — it is a pure TTS model.Download the language model file (e.g., ggml-model-Q4_0.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., ggml-model-Q4_K_M.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., MiniCPM-V-4_6-Q4_K_M.gguf) and the vision model file (mmproj-model-f16.gguf) from the repository.
Download the language model file (e.g., MiniCPM5-1B-Q4_K_M.gguf) from the repository. MiniCPM5 is text-only, so no mmproj is required.
Download the language model file (e.g., MiniCPM5-2B-Q4_K_M.gguf) from the repository. MiniCPM5 is text-only, so no mmproj is required.
VoxCPM2 is a ~2B-parameter text-to-speech model. It consists of two GGUF files:
VoxCPM2-BaseLM-Q4_K_M.gguf, ~956 MB) — the MiniCPM-4 based language modelVoxCPM2-Acoustic-F16.gguf, ~1.74 GB) — the acoustic decoder (FSQ + LocEnc + LocDiT + AudioVAE)VoxCPM2 supports 30+ languages and 9 Chinese dialects. It can generate speech from text directly (voice-design mode) or clone a voice from a reference audio clip.
After downloading, place both .gguf files in the app's Documents directory (iOS) or in the per-model folder under {ExternalFilesDir}/models/ (Android / HarmonyOS). You can also download them directly inside the app via Model Manager. Once models are downloaded, select VoxCPM2 and the app switches to the TTS interface automatically.
Swift
69.5%
Kotlin
14.5%
C++
7.4%
Objective-C++
3.3%
Shell
2.3%
Objective-C
1.6%