mlboydaisuke commited on
Commit
fc04c3c
·
verified ·
1 Parent(s): 7cd1853

gen-cards: regenerate Use-it block

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md CHANGED
@@ -35,6 +35,45 @@ no experts, no router, just the proven token mixers at scale. 64 layers on a 3:1
35
  of a large dense model at the memory-bandwidth speed that implies on a Mac.
36
 
37
  <!-- gen-cards:use-it begin id=qwen3.6-27b (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  <!-- gen-cards:use-it end -->
39
 
40
  ## Bundle
 
35
  of a large dense model at the memory-bandwidth speed that implies on a Mac.
36
 
37
  <!-- gen-cards:use-it begin id=qwen3.6-27b (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
38
+ ## Use it
39
+
40
+ ▶️ **Run it (source)** — the [ChatDemo runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/ChatDemo)
41
+ (GUI + CLI, one app for every chat model in the catalog):
42
+
43
+ ```bash
44
+ git clone https://github.com/john-rocky/coreai-kit
45
+ open coreai-kit/Examples/ChatDemo/ChatDemo.xcodeproj
46
+ # → Run, then pick "Qwen3.6-27B (dense)" in the model picker
47
+
48
+ # agents / headless (macOS):
49
+ cd coreai-kit/Examples/ChatDemo
50
+ swift run chat-cli --model qwen3.6-27b --prompt "What can you do, offline?"
51
+ ```
52
+
53
+ 💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
54
+
55
+ ```swift
56
+ import CoreAIKit
57
+
58
+ let chat = try await ChatSession(catalog: "qwen3.6-27b")
59
+ let reply = try await chat.respond(to: prompt)
60
+ // reply: the answer, generated fully on-device
61
+ ```
62
+
63
+ The take-home is [`Examples/ChatDemo/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/ChatDemo/Sources/QuickStart.swift)
64
+ — this exact code as one typed function, no UI; the CLI is an argument shell over it, and
65
+ the GUI drives the same `ChatSession` across turns for its transcript.
66
+ Multi-turn? Hold the `ChatSession` and call `respond(to:)` per turn — it keeps the
67
+ conversation history; `streamResponse(to:)` yields tokens as they decode.
68
+
69
+ **Integration checklist**
70
+
71
+ - SPM: `https://github.com/john-rocky/coreai-kit` → product **CoreAIKit**
72
+ - Info.plist: none needed
73
+ - Entitlements: none needed (macOS)
74
+ - First run downloads the model — 28.0 GB (Mac) — then it loads from the
75
+ local cache (Application Support; progress via the `downloadProgress` callback)
76
+ - Measure in Release — Debug is ~3× slower on per-token host work
77
  <!-- gen-cards:use-it end -->
78
 
79
  ## Bundle