AGENTIC COMMONSAI industry briefings

繁中EN

TopicAI Coding & Developer ToolsPublished

All English articles

antirez's ds4: A Local LLM Inference Engine Built for Metal

On this page6 sections
  1. More Than an Engine
  2. By Design, Not a Universal GGUF Runner
  3. Measured Performance and Where ds4 Runs
  4. One Week of Work, the AI-Era Way
  5. Reading It Against the Local AI Landscape
  6. References

Summary: Salvatore Sanfilippo’s ds4, released in early May 2026, is an MIT-licensed C local inference engine and toolkit optimized for selected DeepSeek V4 and GLM models rather than arbitrary GGUF files. It uses aggressive routed-expert quantization and compressed KV caching to run DeepSeek V4 Flash on 96 or 128 GB Macs, and antirez says AI coding agents helped him build the main body in one week.

In early May 2026, Salvatore Sanfilippo — antirez, the creator of Redis — put a new open-source project, ds4 (DwarfStar), on the Hacker News front page, where it has drawn nearly 500 points and some 160 comments. The project is a local LLM inference engine written in C, and its stated ambition is plain: to be “the best way to run a few excellent large language models on consumer hardware.” In a 2026 ruled by hosted APIs, the reason he gives is just as blunt — “AI is too critical to be just a provided service.”

More Than an Engine

The repository holds a whole toolkit rather than a lone engine. Besides the ds4 CLI there is ds4-agent, a native coding agent, and ds4-server, an HTTP server whose default listening address is 127.0.0.1:8000, plus eval, bench, and GGUF tooling. The supported model list is kept narrow on purpose: DeepSeek V4 Flash (its vision capability is experimental), DeepSeek V4 PRO, and GLM 5.2, 5.3, and 5.3 Flash — a list with no finish line: models get swapped when something better arrives. A first run should start with the Q2 quantization. Licensing is MIT. The main body is C, the Metal portion is written in Objective-C, and CUDA carries kernels of its own. GGML’s copyright notice survives in the license file — antirez is upfront that parts of the quantization layouts and CPU kernels were adapted from llama.cpp, crediting Georgi Gerganov.

By Design, Not a Universal GGUF Runner

Against general-purpose runners like llama.cpp and Ollama, ds4 takes the other side: arbitrary GGUF files are out, and only model files produced by the project itself will run. That trade purchases optimization sunk deep into the DeepSeek and GLM architectures — routed-expert quantization applied aggressively, and a KV cache kept compressed. Deployment stretches past a single machine. The main effort sits on Metal, for Macs with at least 96 GB of RAM; smaller machines lean on SSD streaming to run models their memory cannot hold. The CUDA port has the DGX Spark as its headline target and covers multi-GPU systems such as the L40S; the ROCm port lines up with Strix Halo platforms. Two 128 GB Macs can even be joined for tensor parallelism over RDMA, and RAM can be pooled across machines through pipeline parallelism.

Measured Performance and Where ds4 Runs

The README puts figures on the table: eight L40S cards together reach about 126 tokens per second of aggregate generation while 16 sessions run at once, and the benchmark sweep ran on an M5 Max with 128 GB of RAM. What truly defines the project is its quantization recipe — in a blog post, antirez explains that DeepSeek V4 Flash, a quasi-frontier open-weights model, becomes feasible on 96 or 128 GB of RAM once the extremely asymmetric 2/8-bit recipe is applied. Speculative decoding is optional (MTP on the GLM side, DSpark on Flash), and directional steering runs without rebuilding the KV cache. The project sits at beta and, by its own account, is changing very fast.

One Week of Work, the AI-Era Way

By antirez’s account, the main body of ds4 took a single week to build, at 14 hours a day — nothing like the 4 to 6 hours he has kept up since the early Redis years — with AI coding agents and GPT 5.5 contributing heavily, while ideas, testing, and debugging remained in human hands. He goes a step further: the ds4 code itself is a template for coding agents to rewrite — say, tuning the inference kernels to your own hardware rather than asking the official version to cover every configuration. That echoes the case we made in our 2026 opening outlook: the development, maintenance, and distribution of software are all being rewritten by agents.

Reading It Against the Local AI Landscape

Three takeaways. First, ds4 shows that optimizing deeply for a handful of models wins back performance generic runners cannot deliver, with asymmetric 2/8-bit quantization setting near-frontier capability onto workstation-class Macs. Second, this is a significant branch in the local inference stack since llama.cpp: universal compatibility holds one path, peak performance drives the other, and for a long while the two will exist side by side. Third, the demonstration effect carries weight — the creator of Redis has shown firsthand that one person plus AI agents can deliver an inference engine inside a week, and he concedes the attention arrived well ahead of his expectations. For independent developers it is a firm feasibility signal: the next stage of local AI may well be pushed by small, deep, agent-rewritable projects of this sort.

References

AGENTIC COMMONSOperated by PHLEGON LABS
ShareXEmail
Support us

Related reading

  1. Running Gemma 4 26B in 2 GB of RAM: TurboFieldfare

    Open-source Swift and Metal engine TurboFieldfare keeps about 2 GB resident, streaming Gemma 4 26B-A4B MoE experts from SSD per token — 5-6 tok/s on an 8GB MacBook Air.

    Local AI

  2. PrismML 1-bit Bonsai: An 8B LLM Squeezed Into 1.15 GB

    Caltech spinoff PrismML emerged from stealth with 1-bit Bonsai, an end-to-end 1-bit LLM family: the 8B flagship is 1.15 GB, 14x smaller than 16-bit peers, Apache 2.0 licensed.

    LLM

  3. Cohere's Tiny Aya: A 3.35B Open Model for 70+ Languages

    Cohere Labs released Tiny Aya: a 3.35B open-weight model covering 70+ languages, built to run on a laptop, debuted at the India AI Impact Summit. Architecture, deployment, and license, broken down.

    Open Models