Cheetah: Why I ditched Candle and wrote a self-developed engine to run Safetensors on old CPUs
21 days ago, I started building a local LLM inference engine. Today, it has 61 stars, peaked at 166 unique visitors in a single day, and is currently powering local agents on vintage hardware. But the journey here is a
21 days ago, I started building a local LLM inference engine. Today, it has 61 stars, peaked at 166 unique visitors in a single day, and is currently powering local agents on vintage hardware.
But the journey here is a bit funny. My announcement post on the official Rust community forum got hidden and flagged for "avoiding the announcement category" (they thought it was an LLM spam).
So instead of arguing with the mods, I just went back to writing code. Here is how Cheetah was born.
The Problem: Local LLMs are too fat
If you've ever used Ollama or early llama.cpp, you know the pain. Running a tiny 0.5B model eats 2.5GB+ of RAM. If you have an old laptop (like my 2013 i5-4200M) or an edge device, you are immediately out of luck. The frameworks (like Candle) materialize the entire weight tensor into memory, causing massive memory bloat.
The Solution: Self-developed, Zero-materialization
I decided to drop Candle completely and write the engine from scratch using Rust and C.
Here are the core architectural decisions:
- No GGUF required: It runs native Safetensors directly.
-
Ant-tiered memory: We use mmap and
madvise(DONTNEED)at the OS page level. The engine reads weights on demand, computes them using AVX2 SIMD, and drops the pages instantly. - KV Q8 Quantization: We quantized the KV cache. You can now run a 1.5B model with a 90MB steady RSS during multi-turn chat.
- 1000x KV Cache Speedup: For multi-turn agent requests, cached prefixes reduce latency from 180+ seconds to 0.17 seconds.
The Result
Running a 1.5B model (Qwen2.5) on a 2013 CPU:
- Memory: 90MB (CLI) / 111MB (HTTP Serve mode)
- Decode Speed: ~3.8 tokens/sec
- MCP Support: Built-in for Agent integrations.
Note: We don't provide pre-built binaries. It's an engine designed to be compiled on your machine for maximum hardware acceleration (cargo build --release).
What's next?
The architecture is completely frozen. Multimodal support will be handled strictly via ephemeral .so plugins, keeping the core ultra-lean. We are also releasing an independent cheetah-ops crate to give back to the Rust ecosystem
If you are tired of RAM-heavy local AI, give Cheetah a try.
GitHub: https://github.com/DA3M0/Cheetah
I'd love to hear your thoughts on the memory optimization or the Agent backend design!
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.