[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79861":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},79861,"MiniCPM-V-Apps","OpenBMB\u002FMiniCPM-V-Apps","OpenBMB","MiniCPM-V apps — fully offline multimodal chat on iOS \u002F Android \u002F HarmonyOS",null,"https:\u002F\u002Fgithub.com\u002FOpenBMB\u002FMiniCPM-V-Apps","Swift",303,43,6,13,0,11,28,39,33,4.93,false,"main",[25,26,27,28,29],"android","harmonyos","ios","minicpm","minicpm-v","2026-06-12 02:03:55","# MiniCPM-V Demo — iOS, Android & HarmonyOS\n\n**English** | [中文](README_zh.md)\n\nThis demo runs the MiniCPM-V family of multimodal models fully on-device on iOS, Android, and HarmonyOS NEXT. Three model versions are currently supported:\n\n* **MiniCPM-V 2.6**\n* **MiniCPM-V 4.0**\n* **MiniCPM-V 4.6**\n\nThis repository contains three on-device demos for MiniCPM-V (multimodal LLM) running fully locally via `llama.cpp`:\n\n* `MiniCPM-V-demo\u002F` — iOS demo (Xcode project)\n* `MiniCPM-V-demo-Android\u002F` — Android demo (Gradle \u002F Kotlin)\n* `MiniCPM-V-demo-HarmonyOS\u002F` — HarmonyOS NEXT demo (DevEco Studio \u002F ArkTS)\n\nAll three demos share the same `llama.cpp` submodule (branch `MiniCPM-V`) at the repo root.\n\n> **NOTE**: This project bundles `llama.cpp` as a git submodule. The upstream fork `tc-mb\u002Fllama.cpp` carries a dozen unrelated branches and a full clone weighs ~350 MB, so `shallow = true` is set in `.gitmodules` by default. The recommended **shallow + single-branch** clone is:\n>\n> ```bash\n> # one-shot (parent repo + submodules, all shallow)\n> git clone --recurse-submodules --shallow-submodules \\\n>     https:\u002F\u002Fgithub.com\u002FOpenBMB\u002FMiniCPM-V-Apps.git\n> cd MiniCPM-V-Apps\n> ```\n>\n> Or, if you've already cloned the parent repo and want to init the submodule afterwards:\n>\n> ```bash\n> git submodule update --init --recursive --depth 1 --single-branch\n> ```\n>\n> This only pulls a single commit of the `MiniCPM-V` branch (~tens of MB) instead of the full llama.cpp fork history. Developers who need to push to `tc-mb\u002Fllama.cpp:MiniCPM-V` can run `git fetch --unshallow` inside the submodule to lift the shallow restriction.\n\nThe README is organised in two parts:\n\n* **Part 1 — Platform setup**: how to build and run the demo on iOS, Android and HarmonyOS.\n* **Part 2 — GGUF model files**: where to get the model weights for each MiniCPM-V version, and the minimum on-device hardware needed to run them.\n\n---\n\n> **Just want to install the app?** Pre-built TestFlight (iOS) \u002F APK (Android) \u002F HAP (HarmonyOS) packages and step-by-step install instructions are in **[DOWNLOAD.md](DOWNLOAD.md)**. The rest of this README is only needed if you want to build from source.\n\n---\n\n## Part 1. Platform Setup\n\n### 1.1 iOS Demo\n\n**NOTE: To deploy and test the app on an iOS device, you may need an Apple Developer account.**\n\n#### 1.1.1 Install Xcode & command-line tools\n\n* Download Xcode from the App Store (verified on Xcode 26.1; project deployment target = iOS 16.4)\n* Install the Command Line Tools:\n\n  ```bash\n  xcode-select --install\n  ```\n* Agree to the software license agreement:\n\n  ```bash\n  sudo xcodebuild -license\n  ```\n* CMake ≥ 3.28 (needed by the xcframework build in the next step):\n\n  ```bash\n  brew install cmake\n  ```\n\n#### 1.1.2 Build llama.xcframework (required on first build)\n\nThis repo **does not track** any compiled artefacts, so the prebuilt `llama.xcframework` (~189 MB) needs to be produced locally from the `llama.cpp` submodule and dropped into `MiniCPM-V-demo\u002Fthirdparty\u002F` 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:\n\n```bash\n.\u002Fscripts\u002Fbuild_xcframework.sh\n```\n\nThe output is installed at `MiniCPM-V-demo\u002Fthirdparty\u002Fllama.xcframework\u002F`.\n\nIf you need a different build scope (simulator-only, full multi-platform, …), the script forwards `MINIMAL_MODE`:\n\n```bash\nMINIMAL_MODE=ios-sim    .\u002Fscripts\u002Fbuild_xcframework.sh   # simulator only        (~3 min)\nMINIMAL_MODE=ios-device .\u002Fscripts\u002Fbuild_xcframework.sh   # device only           (~3 min)\nMINIMAL_MODE=ios        .\u002Fscripts\u002Fbuild_xcframework.sh   # device + simulator (default, ~3 min)\nMINIMAL_MODE=all        .\u002Fscripts\u002Fbuild_xcframework.sh   # iOS + macOS + tvOS + xrOS (~25 min)\n```\n\nThe equivalent manual commands, if you'd rather not use the script:\n\n```bash\ncd llama.cpp\nMINIMAL_MODE=ios .\u002Fbuild-xcframework.sh\ncp -r .\u002Fbuild-apple\u002Fllama.xcframework ..\u002FMiniCPM-V-demo\u002Fthirdparty\u002F\n```\n\nDuring 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.\n\n> **When do I need to rebuild?**\n> - The parent repo bumped the llama.cpp submodule pointer (`git submodule status` shows a commit different from your last local build).\n> - You edited any source under `llama.cpp\u002F` that affects the framework.\n\n#### 1.1.3 Open in Xcode and run\n\nOpen `MiniCPM-V-demo\u002FMiniCPM-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.\n\nIf Xcode fails with `There is no XCFramework found at '...\u002Fllama.xcframework'`, you skipped §1.1.2 — go back and run the build.\n\n### 1.2 Android Demo\n\nRequirements:\n\n* Android Studio (Giraffe or newer)\n* Android SDK + NDK (the project pins NDK `27.0.12077973` and CMake `3.22.1`)\n* A physical device with a 64-bit ARM SoC (`arm64-v8a`)\n* Device RAM: see the per-model requirements in [Part 2](#part-2-gguf-model-files)\n\nBuild & run:\n\n```bash\ncd MiniCPM-V-demo-Android\n.\u002Fgradlew assembleDebug\n```\n\nOr open `MiniCPM-V-demo-Android\u002F` directly in Android Studio and click Run.\n\nThe 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.\n\n### 1.3 HarmonyOS Demo\n\nRequirements:\n\n* DevEco Studio 5.0 or newer (with the HarmonyOS Native SDK \u002F NDK)\n* A real device or emulator running HarmonyOS API 12+ (e.g. nova 14 vitality \u002F Mate 60 \u002F Pura 70)\n* 64-bit ARM architecture (`arm64-v8a`)\n* Device RAM: see the per-model requirements in [Part 2](#part-2-gguf-model-files)\n\nBuild & run:\n\n1. Open `MiniCPM-V-demo-HarmonyOS\u002F` in DevEco Studio.\n2. `File` → `Project Structure` → `Signing Configs` and tick **Automatically generate signature** (requires a Huawei developer account; this only needs to be done once).\n3. Connect the device with USB debugging enabled, then click Run (the green triangle).\n\nAfter 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\u002FREADME_zh.md` for the expected directory layout.\n\n> The HarmonyOS port shares the exact same `llama.cpp` submodule, model catalogue, OBS direct-link URLs and MD5 hashes with the iOS \u002F Android demos.\n\n---\n\n## Part 2. GGUF Model Files\n\n### Hardware requirements\n\nThe 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.\n\n| Model | LLM params | Recommended quant | LLM file (Q4) | mmproj (f16) | Total download | Recommended device RAM |\n| --- | --- | --- | --- | --- | --- | --- |\n| MiniCPM-V 2.6 | 8B | Q4_K_M | ~4.4 GB | ~1.0 GB | ~5.4 GB | **≥ 8 GB** |\n| MiniCPM-V 4.0 | 4.1B | Q4_K_M | ~2.0 GB | ~0.9 GB | ~2.9 GB | **≥ 6 GB** |\n| MiniCPM-V 4.6 | 1.3B | Q4_K_M | ~0.5 GB | ~1.1 GB | ~1.6 GB | **≥ 6 GB** |\n\nNotes:\n\n* `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.\n* All three demos default to a context window of 4K tokens. Larger contexts will increase the KV-cache footprint roughly linearly, so on a borderline device you may need to lower it.\n* On Android \u002F HarmonyOS, devices with 8 GB+ RAM are strongly recommended for V 2.6. On iOS, V 2.6 has been validated on iPhone 15 Pro \u002F 16 series and recent iPads with M-series chips; older 6 GB devices may swap heavily.\n\n### 2.1 MiniCPM-V 2.6 GGUF Files\n\n#### Download Official GGUF Files\n\n* HuggingFace: [https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-2_6-gguf](https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-2_6-gguf)\n* ModelScope: [https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-2_6-gguf](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-2_6-gguf)\n\nDownload the language model file (e.g., `ggml-model-Q4_0.gguf`) and the vision model file (`mmproj-model-f16.gguf`) from the repository.\n\n### 2.2 MiniCPM-V 4.0 GGUF Files\n\n#### Download Official GGUF Files\n\n* HuggingFace: [https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-4-gguf](https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-4-gguf)\n* ModelScope: [https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-4-gguf](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-4-gguf)\n\nDownload the language model file (e.g., `ggml-model-Q4_K_M.gguf`) and the vision model file (`mmproj-model-f16.gguf`) from the repository.\n\n### 2.3 MiniCPM-V 4.6 GGUF Files\n\n#### Download Official GGUF Files\n\n* HuggingFace: [https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-4.6-gguf](https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM-V-4.6-gguf)\n* ModelScope: [https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-4.6-gguf](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM-V-4.6-gguf)\n\nDownload 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.\n\n### 2.4 MiniCPM5-1B GGUF Files (text-only)\n\n#### Download Official GGUF Files\n\n* HuggingFace: [https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM5-1B-GGUF](https:\u002F\u002Fhuggingface.co\u002Fopenbmb\u002FMiniCPM5-1B-GGUF)\n* ModelScope: [https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM5-1B-GGUF](https:\u002F\u002Fmodelscope.cn\u002Fmodels\u002FOpenBMB\u002FMiniCPM5-1B-GGUF)\n\nDownload the language model file (e.g., `MiniCPM5-1B-Q4_K_M.gguf`) from the repository. MiniCPM5 is text-only, so no `mmproj` is required.\n","MiniCPM-V-Apps 项目提供了一个完全离线的多模态聊天应用，支持 iOS、Android 和 HarmonyOS 平台。该项目基于 MiniCPM-V 系列模型，利用 `llama.cpp` 实现了在设备上的本地运行，无需网络连接即可进行文本和图像处理等多模态交互。当前支持三种模型版本：MiniCPM-V 2.6、4.0 和 4.6。该应用特别适合需要在无网络环境下仍能保持高效对话体验的场景，如户外探险、飞行途中或对隐私有高要求的环境。通过 Xcode（iOS）、Gradle\u002FKotlin（Android）及 DevEco Studio\u002FArkTS（HarmonyOS）开发工具链，开发者可以轻松构建并部署适用于各自平台的应用程序。",2,"2026-06-11 03:58:20","trending"]