transcribe

This New Engine Runs Local AI Using 10x Less RAM! (Cactus)

Better Stack · 5m · transcribed Aug 2026
More from Better Stack Business
𝕏 Share ▶ YouTube 📥 PDF 🤖 .md

Section Insights

# 0:00

Introduction to Cactus

What is Cactus and how does it address AI model challenges on edge devices?

Cactus is a low-latency inference engine designed for mobile and edge devices, addressing issues like heavy resource usage and memory management by optimizing for neural processing units and limited RAM.

  • Cactus treats mobile and edge devices as first-class citizens.
  • It aims to reduce battery drain and memory issues associated with AI models.
  • The engine is specifically built for the constraints of edge devices.
# 1:03

Zero-Copy Memory Mapping

How does Cactus manage memory efficiently?

Cactus employs a zero-copy memory mapping system that only loads necessary tensors into active compute cycles, allowing it to utilize large models without overwhelming the device's memory.

  • Cactus uses a proprietary format for effective memory mapping.
  • It prioritizes neural processing units (NPUs) over traditional GPUs for better performance.
  • The system minimizes the risk of app shutdown due to memory spikes.
# 2:07

Hybrid Router Feature

What is the hybrid router and how does it enhance performance?

The hybrid router allows Cactus to switch between local and cloud models based on task complexity, ensuring efficient resource use while maintaining user experience.

  • It uses a confidence-based routing system for task management.
  • Local models are used for simple tasks, while complex tasks are offloaded to cloud models.
  • This feature helps keep costs low without sacrificing performance.
# 3:11

Real-Time Transcription Demo

How does Cactus perform in real-time transcription tasks?

In a demo, Cactus achieved approximately 260 ms latency for local transcription on an older iPhone model, showcasing its efficiency, while cloud-based transcription averaged around 2,000 ms.

  • Cactus demonstrates strong performance on older edge devices.
  • Local processing is significantly faster than cloud processing.
  • The hybrid approach allows for flexibility in handling different tasks.
# 4:15

Conclusion and Future Outlook

What are the key takeaways about Cactus and its potential?

Cactus is positioned as an innovative solution for on-edge optimization with a focus on NPU-friendly architecture, offering various SDKs and models for multimodal tasks.

  • Cactus is a promising tool for edge device AI applications.
  • The engine's architecture is tailored for efficient processing.
  • Continuous evolution and updates are anticipated in the product's development.

Transcript

0:00 This is Cactus. It's a low-latency inference engine designed to treat mobile and edge devices as first-class citizens. So, usually when we try to run AI models on edge devices, they feel heavy and battery draining and prone to getting killed by the mobile operating system's memory manager. But, Cactus is trying to solve this problem because it's built specifically for the constraints of the neural processing units and limited RAM. So, today we're going to look at Cactus, see how it works, and test it out on an edge device to see how it performs.

0:34 So, let's dive into it. The biggest bottleneck for local AI isn't actually compute, it's the memory overhead. On a standard mobile device, the operating system is extremely aggressive about killing apps that spike in RAM usage. But, Cactus solves this by using a zero-copy memory mapping. Instead of the usual approach where you load everything to RAM, Cactus maps model weights directly from storage.

1:05 It's a zero-copy system that only pulls specific tensors into the active compute cycle as they are needed. You get the reasoning power of a large model without the risk of the operating system shutting your app down. And to achieve this, they've even transitioned away from the traditional GGUF format and have their own proprietary {dot}cact format that allows this mapping to be effective on edge devices. But, the real heavy lifting happens in the NPU or the neural processing unit. While most local engines default to the GPU, Cactus is built to be NPU first. If you've looked at modern chips from Apple, Qualcomm, or MediaTek, they all have dedicated silicon just for neural networks. Cactus communicates with these units directly, bypassing the usual translation layers that slow down your inference. And they've actually optimized specific models to take full advantage of these matrix multiplication units. If you head over to the Cactus dashboard, you'll see a list of NPU optimized models ready for download. And another cool feature Cactus has is the hybrid router. Now, the reality is that on edge devices, local models, no matter how optimized, eventually hit that reasoning ceiling.

2:22 And this is where the hybrid router comes in. Instead of forcing you to choose between a fast but limited local model and a smart but expensive cloud model, Cactus can handle both and swap between them. It uses a confidence-based routing system, and if you ask it a simple question, it stays on the NPU because it's fast, private, and costs you nothing. But if the local model senses that the task is too complex or require a massive context window, it automatically hands the specific request off to a frontier model on the cloud.

2:55 Your code stays the same, the engine just manages the failover in the background. So, it's a production-ready way to keep costs low without sacrificing the user experience when things get complicated. Now, all that sounds cool, but I want to try it out for myself. So, on their landing page, they have this demo where they show how you can do a real-time transcription with about 100 ms latency on an edge device. So, I went ahead and vibe coded a little Swift app using their Swift Cactus package that supports running a real-time transcription using their Parakeet speech model locally and a Gemini model on the cloud. So, let's try it out. As you can see, locally, we are averaging about 260 ms of latency with live streaming. And mind you, I'm running this on an older iPhone model, the 12 Pro. So, for an older model like this one, I think this performance on edge is pretty good. And if we switch to cloud, Cactus switches to Gemini 2.5 flash as the cloud alternative. And for some reason, they don't have the same Parakeet model on their cloud side, so I was forced to use Gemini. And we can see here that this is averaging at about 2,000 milliseconds for a 3-second batch transcription. And I guess this is to be expected because it is doing a round trip to the data server. But realistically, most of the time you would end up using the on-Edge transcription anyway. But the cloud option is useful for other tasks like heavy image analysis or something else that would be a heavier task. So there you have it, folks. That is the Cactus engine in a nutshell. I think they are doing something really interesting here.

4:36 I like how they are thinking about on-Edge optimization using a custom MPU-friendly architecture. And I like the fact that they offer so many SDKs and so many models for all sorts of multimodal tasks. And I'm really curious to see how their product evolves, so I'll be keeping an eye on their progress for sure. But what do you folks think about Cactus? Have you tried it? Let us know in the comments section down below. And folks, if you like these types of breakdowns, please let me know by smashing that like button underneath the video. And also, don't forget to subscribe to our channel. This has been Andres from Better Stack, and I will see you in the next videos.

5:17 >>

Summary

Cactus is a low-latency inference engine designed to optimize AI model performance on mobile and edge devices by addressing memory overhead issues. It employs a zero-copy memory mapping technique and prioritizes neural processing units (NPUs) for efficient computation, allowing for seamless transitions between local and cloud models based on task complexity.

- Cactus targets the memory overhead bottleneck in local AI applications, which often leads to app shutdowns by mobile operating systems.
- It utilizes zero-copy memory mapping to directly access model weights from storage, pulling only necessary tensors into RAM.
- The engine is optimized for NPUs, bypassing traditional GPU reliance and enhancing inference speed.
- Cactus features a hybrid router that dynamically switches between local and cloud models based on task complexity, maintaining user experience and cost efficiency.
- Real-time transcription tests showed promising performance on older devices, averaging 260 ms latency locally compared to 2,000 ms for cloud processing.
- The platform supports various SDKs and models for multimodal tasks, indicating a strong focus on edge optimization.
- The proprietary {dot}cact format enhances model mapping efficiency on edge devices.

Questions Answered

What is Cactus and how does it address AI model challenges on edge devices?

Cactus is a low-latency inference engine designed for mobile and edge devices, addressing issues like heavy resource usage and memory management by optimizing for neural processing units and limited RAM.

How does Cactus manage memory efficiently?

Cactus employs a zero-copy memory mapping system that only loads necessary tensors into active compute cycles, allowing it to utilize large models without overwhelming the device's memory.

What is the hybrid router and how does it enhance performance?

The hybrid router allows Cactus to switch between local and cloud models based on task complexity, ensuring efficient resource use while maintaining user experience.

How does Cactus perform in real-time transcription tasks?

In a demo, Cactus achieved approximately 260 ms latency for local transcription on an older iPhone model, showcasing its efficiency, while cloud-based transcription averaged around 2,000 ms.

What are the key takeaways about Cactus and its potential?

Cactus is positioned as an innovative solution for on-edge optimization with a focus on NPU-friendly architecture, offering various SDKs and models for multimodal tasks.

© transcribe · For agents Built with care and craft by Gokul Rajaram