United Kingdomcactus-compute/engine
2bit quants, kernels and runtime for consumer devices.
Featured achievements
The project's latest awards
#1 Repository of the day
#2 Repository of the day
#2 Repository of the day
🌵 Cactus: Edge AI Engine for Phones, Wearables, and Macs
Hybrid edge-cloud AI runtime brings text, speech, and vision to consumer devices with OpenAI-compatible APIs.
Cactus, from cactus-compute, is a C++ hybrid edge-cloud AI engine for mobile devices and wearables. It targets on-device inference with a stack that spans custom quantization, CPU/GPU kernels, a zero-copy computation graph, and Cactus Engine APIs for chat, speech, and vision. The README positions it as an OpenAI-compatible option for running AI on Apple, Samsung, Pixel-class devices, and Macs.
✨ Highlights
- OpenAI-compatible Engine APIs: Cactus Engine exposes APIs for text, speech, and vision, with a C interface shown through
cactus_initandcactus_complete. - Hybrid edge-cloud design: The engine can run locally and reports
cloud_handoff, making room for cloud fallback when needed. - Custom quantization: Cactus Quants uses a custom rotation-based quantization technique, including 2-bit-class formats such as CQ2, CQ2.54, CQ3.26, and CQ4.
- Zero-copy computation graph: Cactus Graph provides a computation graph API for inputs, matmul, transpose, execution, and output retrieval.
- Device-focused kernels: Cactus Kernels targets CPU/GPU execution on consumer hardware including Apple, Samsung, Pixel, and similar devices.
- Strong local performance examples: The README reports benchmark examples such as Gemma-4-E2B-CQ4 reaching 2964tps prefill / 154tps decode on Mac M5 Max and 729tps / 37tps on iPhone 17 Pro.
- Model conversion and downloads: Any HuggingFace model can be converted with
cactus convert [HF-Name], some models are pre-uploaded on HuggingFace, andcactus runcan download or convert models when missing. - Needle for tool calling: The related Needle model is described as a 26M parameter model for on-device tool calling, runnable with
cactus run Cactus-Compute/needle.
💡 Why it matters
Cactus stands out by combining the full inference stack in one project: quantization, kernels, graph execution, and a higher-level engine API. That makes it useful for developers who want local or hybrid AI features on consumer devices without treating model runtime, performance, and deployment as separate problems.
It fits best where low-latency on-device AI matters, such as mobile assistants, transcription, vision features, and tool-calling workflows. The included benchmarks and quantization accuracy tables also give concrete signals about speed and quality tradeoffs across devices and bit widths.
#EdgeAI #OnDeviceInference #LLM #CPlusPlus #TiniX
Similar Projects
Discover other similar projects and AI models.
Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.
Get up and running with Inkling, Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
21 Lessons, Get Started Building with Generative AI
Reverse engineer anything with agents, from app behavior down to native binaries.