量化和推理引擎、算子内核与运行时,适用于手机、可穿戴设备、智能家居和机器人。
[![Docs][docs-shield]][docs-url] [![Website][website-shield]][website-url] [![GitHub][GitHub-shield]][GitHub-url] [![HuggingFace][hf-shield]][hf-url] [![Reddit][reddit-shield]][reddit-url] [![Blog][blog-shield]][blog-url]
一款面向移动设备与可穿戴设备的边缘-云端混合 AI 引擎。
┌─────────────────┐
│ Cactus Engine │ ←── OpenAI-compatible APIs for text, speech, and vision.
└─────────────────┘
│
┌─────────────────┐
│ Cactus Graph │ ←── Zero-copy computation graph
└─────────────────┘
│
┌─────────────────┐
│ Cactus Kernels │ ←── CPU/GPU kernels for (Apple, Samsung, Pixel, etc.)
└─────────────────┘
│
┌─────────────────┐
│ Cactus Quants │ ←── Custom rotation-based quantization technique
└─────────────────┘ brew install cactus-compute/cactus/cactuscactus run…来自 Gemma4-E2B 的示例响应
…#include "cactus_graph.h"
CactusGraph graph;
auto a = graph.input({2, 3}, Precision::FP16);
auto b = graph.input({3, 4}, Precision::INT8);
auto x1 = graph.matmul(a, b, false);
auto x2 = graph.transpose(x1);
auto result = graph.matmul(b, x2, true);
float a_data[6] = {1.1f, 2.3f, 3.4f, 4.2f, 5.7f, 6.8f};
float b_data[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
graph.set_input(a, a_data, Precision::FP16);
graph.set_input(b, b_data, Precision::INT8);
graph.execute();
void* output_data = graph.get_output(result);
graph.hard_reset(); 命令:cactus benchmark [可选 --ios 或 --android]
| 设备 | LLM | VLM | 转录 | RAM |
|---|---|---|---|---|
| Mac M5 Max | 2964tps / 154tps | 0.09s / 168tps | 0.15s | 1348MB |
| Mac M4 Pro | 1963tps / 101tps | 0.25s / 112tps | 0.21s | 1225MB |
| Mac M3 Pro | 1294tps / 64tps | 0.40s / 72tps | 0.37s |
暂无开放 Issues,或尚未同步最近议题。