<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DA3M0</title>
    <description>The latest articles on DEV Community by DA3M0 (@da3m0).</description>
    <link>https://dev.to/da3m0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4264575%2Fe425bdf6-dc65-4d96-bdc7-3c12b3a14588.png</url>
      <title>DEV Community: DA3M0</title>
      <link>https://dev.to/da3m0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/da3m0"/>
    <language>en</language>
    <item>
      <title>Cheetah: Why I ditched Candle and wrote a self-developed engine to run Safetensors on old CPUs</title>
      <dc:creator>DA3M0</dc:creator>
      <pubDate>Wed, 25 Nov 2026 11:01:10 +0000</pubDate>
      <link>https://dev.to/da3m0/cheetah-why-i-ditched-candle-and-wrote-a-self-developed-engine-to-run-safetensors-on-old-cpus-cpi</link>
      <guid>https://dev.to/da3m0/cheetah-why-i-ditched-candle-and-wrote-a-self-developed-engine-to-run-safetensors-on-old-cpus-cpi</guid>
      <description>&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;But the journey here is a bit funny. My announcement post on the official Rust community forum got &lt;strong&gt;hidden and flagged&lt;/strong&gt; for "avoiding the announcement category" (they thought it was an LLM spam). &lt;/p&gt;

&lt;p&gt;So instead of arguing with the mods, I just went back to writing code. Here is how &lt;strong&gt;Cheetah&lt;/strong&gt; was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Local LLMs are too fat
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Self-developed, Zero-materialization
&lt;/h2&gt;

&lt;p&gt;I decided to drop Candle completely and write the engine from scratch using Rust and C. &lt;/p&gt;

&lt;p&gt;Here are the core architectural decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No GGUF required&lt;/strong&gt;: It runs native Safetensors directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ant-tiered memory&lt;/strong&gt;: We use mmap and &lt;code&gt;madvise(DONTNEED)&lt;/code&gt; at the OS page level. The engine reads weights on demand, computes them using AVX2 SIMD, and drops the pages instantly. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KV Q8 Quantization&lt;/strong&gt;: We quantized the KV cache. You can now run a 1.5B model with a &lt;strong&gt;90MB steady RSS&lt;/strong&gt; during multi-turn chat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1000x KV Cache Speedup&lt;/strong&gt;: For multi-turn agent requests, cached prefixes reduce latency from 180+ seconds to 0.17 seconds.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;Running a 1.5B model (Qwen2.5) on a 2013 CPU:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt;: 90MB (CLI) / 111MB (HTTP Serve mode)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decode Speed&lt;/strong&gt;: ~3.8 tokens/sec&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Support&lt;/strong&gt;: Built-in for Agent integrations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Note: We don't provide pre-built binaries. It's an engine designed to be compiled on your machine for maximum hardware acceleration (&lt;code&gt;cargo build --release&lt;/code&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;The architecture is completely frozen. Multimodal support will be handled strictly via ephemeral &lt;code&gt;.so&lt;/code&gt; plugins, keeping the core ultra-lean. We are also releasing an independent &lt;code&gt;cheetah-ops&lt;/code&gt; crate to give back to the Rust ecosystem&lt;/p&gt;

&lt;p&gt;If you are tired of RAM-heavy local AI, give Cheetah a try. &lt;br&gt;
GitHub: &lt;a href="https://github.com/DA3M0/Cheetah" rel="noopener noreferrer"&gt;https://github.com/DA3M0/Cheetah&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts on the memory optimization or the Agent backend design!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rust</category>
      <category>getway</category>
    </item>
  </channel>
</rss>
