dev-tools 4 min read

ds4: DeepSeek 4 inference engine written in C

ds4 is an MIT licensed C implementation of DeepSeek 4 Flash and PRO local inference, targeting Metal, CUDA and ROCm with 23,453 GitHub stars.

By
Share: X in
GitHub social preview card for antirez/ds4

TL;DR: ds4 is a C project with 23,453 stars and 2,254 forks that implements local inference for DeepSeek 4, in both Flash and PRO variants, across Metal, CUDA and ROCm. It is MIT licensed, authored by antirez, and it has no published topics or homepage.

What the project is

Three model tiers on one codebase is the notable part of the description. DeepSeek 4 Flash and PRO local inference engine covers the small and large ends of the same generation, and the three hardware backends in the same sentence mean the intent is one implementation that runs on an Apple Silicon Mac, an NVIDIA box and an AMD GPU without a rewrite.

FieldValue
Full nameantirez/ds4
DescriptionDeepSeek 4 Flash and PRO local inference engine for Metal, CUDA and ROCm
Stars23,453
Forks2,254
Primary languageC
LicenseMIT
Topicsnone published
Homepagenone listed
Created2026-05-06
Last push2026-09-20
Owner typeUser

Written in C is the choice that makes the rest make sense. Local inference is bound by memory bandwidth and by how little you want between a weight tensor and the arithmetic, and C stays close to both. It is a demanding language to write an inference engine in, and the fact that antirez, a long-time author in that tradition, is behind it is a reasonable signal about the code’s priorities.

The MIT license is notable for an inference engine. It means you can take the implementation, adapt it, and ship it without an obligation to publish your changes, which is the usual reason a commercial local-LLM product would not be usable.

Hardware coverage is the real feature

Metal, CUDA and ROCm is a specific and expensive commitment. Each backend means a separate kernel implementation path, and getting all three correct is a different job from getting one fast. Listing all three means the repository is aiming at hardware you already own rather than a single favoured stack.

Two model tiers with three backends also implies a memory story worth asking about. Whether a given machine can hold the PRO variant, and what Flash costs in quality, are questions the repository metadata cannot answer. A wiki is enabled, so that is where to look.

One thing worth noting about the timeline

The repository was created on 2026-05-06 and the last push was 2026-09-20, about two weeks before this post. It is trending with 23,453 stars despite that gap, and it was the only repository in today’s batch whose most recent commit was more than a few days old. That is not a warning on its own, since a stable inference engine is not expected to change daily, but it does mean you are reading a snapshot rather than watching active development.

How to look at it yourself

There is no homepage and no package index mentioned in the metadata, so the repository is the whole story:

git clone https://github.com/antirez/ds4.git
cd ds4
ls

Confirming the license and scale before you invest time is a single call, and for a C project the absence of build metadata in the repo header is worth resolving early:

curl -s https://api.github.com/repos/antirez/ds4 \
  | jq '{language, license: .license.spdx_id, stars: .stargazers_count, created_at, pushed_at}'

When to use it and when not to

This is for people who have decided they want DeepSeek 4 running on hardware they control, and who have a specific reason to want a C implementation rather than a Python framework. The hardware breadth is the argument for it, and MIT is what makes the source usable in a product.

If you are still deciding between inference runtimes, or you want a server with an API and a queue behind it, this is the wrong layer. A bare engine is a building block, and everything around it, scheduling, batching, request handling, is something you would assemble. Judge it on the model support and the backends, both of which the description states plainly.

Source and Accuracy Notes

  • Source repository: github.com/antirez/ds4 (verified via GitHub API html_url)
  • License: MIT (verified via GitHub API license.spdx_id)
  • Stars at time of writing: 23,453
  • Forks at time of writing: 2,254
  • Facts in this post come from the GitHub API repository endpoint and the repository description only. The README was not fetched, so build commands, quantization formats, model file names, benchmark numbers and token throughput are not claimed here beyond what the description, language and license fields state.