--- license: apache-2.0 base_model: openbmb/MiniCPM-V-4.6 tags: - core-ai - coreai - vision-language - vlm - on-device - iphone - apple pipeline_tag: image-text-to-text language: - en - zh --- # MiniCPM-V-4.6 — Core AI **On-device vision-language model for iPhone / Apple Silicon.** A Core AI port of [`openbmb/MiniCPM-V-4.6`](https://huggingface.co/openbmb/MiniCPM-V-4.6) — the strongest sub-2B open VLM — running fully local on the GPU via the Core AI **pipelined engine**: pick a photo, ask about it, stream the answer. Verified on **iPhone 17 Pro**: image → grounded answer at **~51.5 tok/s** decode, all local.
Fridge photo → recipe ideas, fully on-device on an iPhone 17 Pro (CoreAIChat).
## Use it ⚡ **One line** — run the kit's task op on this model (`import CoreAIOps`; no session, no model plumbing, downloads on first use): ```swift let caption = try await CoreAI.caption(imageAt: url, options: .model("minicpm-v-4.6")) ``` Twenty ops, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/main/docs/COOKBOOK.md). ▶️ **Run it (source)** — the [VLChat runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/VLChat) (GUI + CLI, one app for every vision-language model in the catalog): ```bash git clone https://github.com/john-rocky/coreai-kit open coreai-kit/Examples/VLChat/VLChat.xcodeproj # → Run, then pick "MiniCPM-V 4.6" in the model picker # agents / headless (macOS): cd coreai-kit/Examples/VLChat swift run vlchat-cli --model minicpm-v-4.6 --image sample.jpg --prompt "What is in this image?" ``` 💻 **Build with it** — complete; the glue is kit API, copy-paste runs: ```swift import CoreAIKit import FoundationModels let vlm = try await KitVisionModel(catalog: "minicpm-v-4.6") let session = LanguageModelSession(model: vlm) let image = try ImageFile.load(imageURL) // any image file → CGImage + EXIF orientation let reply = try await session.respond(to: Prompt { prompt Attachment(image.cgImage, orientation: image.orientation) }) // reply.content: the answer about the image, generated fully on-device ``` The take-home is [`Examples/VLChat/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/VLChat/Sources/QuickStart.swift) — this exact code as one typed function, no UI; the CLI is an argument shell over it, and the GUI drives the same `KitVisionModel(catalog:)` behind a `LanguageModelSession`. Multi-turn about the same image? Hold the `LanguageModelSession` and call `respond(to:)` per turn. The photo picker / file chooser is your app's own chrome — `ImageFile.load` (kit API) turns any image file into model input. **Integration checklist** - SPM: `https://github.com/john-rocky/coreai-kit` → product **CoreAIKit** - Info.plist: `NSPhotoLibraryUsageDescription` — only if you use PhotosPicker - Entitlements (iOS): `com.apple.developer.kernel.increased-memory-limit` - First run downloads the model — 2.1 GB (Mac) / 2.1 GB (iPhone) — then it loads from the local cache (Application Support; progress via the `downloadProgress` callback) - Measure in Release — Debug is ~3× slower on per-token host work ## Architecture MiniCPM-V-4.6 (1.3B) = a **SigLIP So400m vision tower** (980px / patch 14 / 27 layers, with a window-attention insert-merger @ layer 6 + a downsample-MLP merger → ÷16 = 64 visual tokens per 448px slice) + a **Qwen3.5-hybrid text backbone** (`qwen3_5_text`: 0.8B, 24 layers, GatedDeltaNet linear attention ×3 : full attention ×1, head_dim 256, vocab 248094, tied head). Connector = 2×2 spatial merges + MLP, spliced into the text embeddings at `