How carloslfu/slotstream works
Slotstream is a native Swift local-inference engine for running a large model on memory-constrained Apple Silicon Macs. The main workflow is to choose a deployment and memory plan, download and verify model weights, then generate responses through the CLI or compatible HTTP APIs. The README also describes vision input, coding-tool integrations, and an in-process Sevra Mac app. Edges rely on the README or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: Engine.swift Inference engine · main.swift CLI · ModelPackRegistry.swift Pack registry · WeightStore.swift Weight store
Components 16
User interfaces
- CLI
Sources/slotstream-cli/main.swift - HTTP server
Sources/Slotstream/Server.swift - Sevra Mac app
apps/macos/Runtime/Inference.swift
Inference runtime
- Inference engine
Sources/Slotstream/Engine.swift - Tool-call parser
Sources/Slotstream/ToolCallSplitter.swift - Vision input
Sources/Slotstream/VisionPrompt.swift
Model deployment
- Pack registry
Sources/Slotstream/ModelPackRegistry.swift - Pinned model
Sources/Slotstream/PinnedModel.swift - Weight store
Sources/Slotstream/WeightStore.swift
Memory and reuse
- Hardware detection
Sources/Slotstream/Machine.swift - Memory profile
Sources/Slotstream/PackMemoryProfile.swift - Prefix cache
Sources/Slotstream/PrefixCache.swift - Expert store
Sources/Slotstream/ExpertStore.swift
Other components
- User
- API client
- Model host
Connections 18
- User → CLI: runs commands
README.md - User → HTTP server: sends requests
README.md - API client → HTTP server: uses compatible API
README.md - CLI → Weight store: pulls weights
Sources/slotstream-cli/main.swift - Weight store → Pinned model: checks pinned files
Sources/Slotstream/WeightStore.swift - Weight store → Model host: downloads from
README.md - CLI → Pack registry: selects deployment
Sources/slotstream-cli/main.swift - Pack registry → Pinned model: defines deployment
Sources/Slotstream/ModelPackRegistry.swift - CLI → Inference engine: starts inference
Sources/slotstream-cli/main.swift - HTTP server → Inference engine: generates responses
Sources/Slotstream/Server.swift - Inference engine → Memory profile: uses resource contract
Sources/Slotstream/Engine.swift - Pack registry → Memory profile: selects resource profile
Sources/Slotstream/ModelPackRegistry.swift - Hardware detection → CLI: informs planning
Sources/slotstream-cli/main.swift - Inference engine → Prefix cache: uses prefix reuse
Sources/Slotstream/Engine.swift - Inference engine → Expert store: uses expert storage
Sources/Slotstream/Engine.swift - Inference engine → Vision input: supports image input
README.md - Inference engine → Tool-call parser: parses tool calls
Sources/Slotstream/Engine.swift - Sevra Mac app → Inference engine: runs in process
README.md