Stream Chat
Stream textual response chunks with low latency and clean stop-reason detection.
CactusBrain Text / Available
Run small language models and generate dense vector embeddings directly on Apple Silicon, Qualcomm, and MediaTek hardware. No token pricing, zero latency jitter, and complete user privacy.
Stream textual response chunks with low latency and clean stop-reason detection.
Generate high-quality embedding vectors locally for search, clustering, and classification.
Execute via optimized Metal shaders on iOS/macOS and Vulkan/NNAPI on Android.
User queries, prompts, and completions stay entirely on-device and never hit the network.
CactusBrain Text manages the underlying model preparation, verification, and memory mapping. You call clean async streaming methods.
import CactusBrainTextSDK
let session = try await CactusBrainTextSDK.configure(
projectKey: Secrets.cactusBrainProjectKey
)
// Stream responses locally on CPU or Metal
var reply = ""
for try await chunk in try await session.chat("Summarize the meeting notes:") {
reply += chunk
}
// Generate local text embeddings for search and ranking
let vector = try await session.embed("on-device vector search")CactusBrain delivers packaged weights for popular open architectures including Qwen 2.5 and LFM, with delta updates and cryptographically verified integrity.