gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -40,6 +40,8 @@ Verified on **iPhone 17 Pro**: image β grounded answer at **~51.5 tok/s** deco
|
|
| 40 |
<!-- gen-cards:use-it begin id=minicpm-v-4.6 (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
| 41 |
## Use it
|
| 42 |
|
|
|
|
|
|
|
| 43 |
β‘ **One line** β run the kit's task op on this model
|
| 44 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 45 |
|
|
@@ -47,21 +49,24 @@ Verified on **iPhone 17 Pro**: image β grounded answer at **~51.5 tok/s** deco
|
|
| 47 |
let caption = try await CoreAI.caption(imageAt: url, options: .model("minicpm-v-4.6"))
|
| 48 |
```
|
| 49 |
|
| 50 |
-
Every op, one shape β [Cookbook](https://github.com/john-rocky/coreai-kit/blob/
|
| 51 |
|
| 52 |
-
βΆοΈ **Run it (source)** β the [VLChat runner](https://github.com/john-rocky/coreai-kit/tree/
|
| 53 |
(GUI + CLI, one app for every vision-language model in the catalog):
|
| 54 |
|
| 55 |
```bash
|
| 56 |
-
git clone https://github.com/john-rocky/coreai-kit
|
| 57 |
-
|
|
|
|
| 58 |
# β Run, then pick "MiniCPM-V 4.6" in the model picker
|
| 59 |
|
| 60 |
# agents / headless (macOS):
|
| 61 |
cd coreai-kit/Examples/VLChat
|
| 62 |
-
swift run vlchat-cli --model minicpm-v-4.6 --image sample.jpg --prompt "What is in this image?"
|
| 63 |
```
|
| 64 |
|
|
|
|
|
|
|
| 65 |
π» **Build with it** β complete; the glue is kit API, copy-paste runs:
|
| 66 |
|
| 67 |
```swift
|
|
@@ -78,7 +83,7 @@ let reply = try await session.respond(to: Prompt {
|
|
| 78 |
// reply.content: the answer about the image, generated fully on-device
|
| 79 |
```
|
| 80 |
|
| 81 |
-
The take-home is [`Examples/VLChat/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/
|
| 82 |
β this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 83 |
the GUI drives the same `KitVisionModel(catalog:)` behind a `LanguageModelSession`.
|
| 84 |
Multi-turn about the same image? Hold the `LanguageModelSession` and call `respond(to:)`
|
|
@@ -87,10 +92,10 @@ per turn. The photo picker / file chooser is your app's own chrome β `ImageFil
|
|
| 87 |
|
| 88 |
**Integration checklist**
|
| 89 |
|
| 90 |
-
- SPM: `https://github.com/john-rocky/coreai-kit` β product **CoreAIKit**
|
| 91 |
- Info.plist: `NSPhotoLibraryUsageDescription` β only if you use PhotosPicker
|
| 92 |
- Entitlements (iOS): `com.apple.developer.kernel.increased-memory-limit`
|
| 93 |
-
- First run downloads the model β 2
|
| 94 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 95 |
- Measure in Release β Debug is ~3Γ slower on per-token host work
|
| 96 |
<!-- gen-cards:use-it end -->
|
|
|
|
| 40 |
<!-- gen-cards:use-it begin id=minicpm-v-4.6 (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
| 41 |
## Use it
|
| 42 |
|
| 43 |
+
**New to Core AI? [Start with CoreAIKit 0.7.1](https://github.com/john-rocky/coreai-kit#readme).** Follow its requirements and first-run steps for `qwen3-0.6b`, then open the same release's [ChatDemo](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/ChatDemo). The README records the tested OS/SDK and download size; model and device coverage is stated per example.
|
| 44 |
+
|
| 45 |
β‘ **One line** β run the kit's task op on this model
|
| 46 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 47 |
|
|
|
|
| 49 |
let caption = try await CoreAI.caption(imageAt: url, options: .model("minicpm-v-4.6"))
|
| 50 |
```
|
| 51 |
|
| 52 |
+
Every op, one shape β [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.1/docs/COOKBOOK.md).
|
| 53 |
|
| 54 |
+
βΆοΈ **Run it (source)** β the [VLChat runner](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/VLChat)
|
| 55 |
(GUI + CLI, one app for every vision-language model in the catalog):
|
| 56 |
|
| 57 |
```bash
|
| 58 |
+
git clone --branch 0.7.1 --depth 1 https://github.com/john-rocky/coreai-kit
|
| 59 |
+
export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
|
| 60 |
+
open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/VLChat/VLChat.xcodeproj
|
| 61 |
# β Run, then pick "MiniCPM-V 4.6" in the model picker
|
| 62 |
|
| 63 |
# agents / headless (macOS):
|
| 64 |
cd coreai-kit/Examples/VLChat
|
| 65 |
+
swift run -c release vlchat-cli --model minicpm-v-4.6 --image sample.jpg --prompt "What is in this image?"
|
| 66 |
```
|
| 67 |
|
| 68 |
+
Use Xcode build **27A266a** from the release's `.xcode-pin`; adjust the app path if your installation is named differently.
|
| 69 |
+
|
| 70 |
π» **Build with it** β complete; the glue is kit API, copy-paste runs:
|
| 71 |
|
| 72 |
```swift
|
|
|
|
| 83 |
// reply.content: the answer about the image, generated fully on-device
|
| 84 |
```
|
| 85 |
|
| 86 |
+
The take-home is [`Examples/VLChat/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/0.7.1/Examples/VLChat/Sources/QuickStart.swift)
|
| 87 |
β this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 88 |
the GUI drives the same `KitVisionModel(catalog:)` behind a `LanguageModelSession`.
|
| 89 |
Multi-turn about the same image? Hold the `LanguageModelSession` and call `respond(to:)`
|
|
|
|
| 92 |
|
| 93 |
**Integration checklist**
|
| 94 |
|
| 95 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.1**) β product **CoreAIKit**
|
| 96 |
- Info.plist: `NSPhotoLibraryUsageDescription` β only if you use PhotosPicker
|
| 97 |
- Entitlements (iOS): `com.apple.developer.kernel.increased-memory-limit`
|
| 98 |
+
- First run downloads the model β ~2,145 MB (Mac) / ~2,145 MB (iPhone) β then it loads from the
|
| 99 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 100 |
- Measure in Release β Debug is ~3Γ slower on per-token host work
|
| 101 |
<!-- gen-cards:use-it end -->
|