cactus-compute/cactus
FreeLow-latency AI engine for mobile devices & wearables
About cactus-compute/cactus
Cactus is an open-source hybrid edge-cloud AI engine designed for mobile devices, wearables, and other resource-constrained hardware. It provides OpenAI-compatible APIs for text, speech, and vision tasks, enabling low-latency inference on-device. The engine is composed of several core components: Cactus Engine for runtime execution, Cactus Graph for zero-copy computation graphs, Cactus Kernels for optimized CPU/GPU kernels (supporting Apple, Samsung, Pixel devices), Cactus Quants for custom rotation-based quantization, and a Cactus Transpiler that converts PyTorch models into Cactus format. It supports features like auto-RAG, tool calling, streaming, and audio transcription. Cactus can run models such as Gemma-4-E2B and demonstrates fast inference speeds (e.g., 45ms time-to-first-token) with low memory usage.
Key Features
Pros & Cons
- Low-latency inference suitable for real-time applications
- Open source and free to use
- Optimized for a variety of popular mobile hardware platforms
- Comprehensive component architecture for flexibility
- Auto-RAG and tool calling enable advanced conversational AI
- Hardware support limited to Apple, Samsung, and Pixel devices
- Requires specific setup and compilation for each platform
- Limited ecosystem compared to larger frameworks like TensorFlow Lite
- Documentation may be sparse for advanced usage