Skip to main content
Back

Redis Creator's DwarfStar 4 Runs DeepSeek V4-Flash Locally on a MacBook

Salvatore Sanfilippo (antirez), creator of Redis, ships a purpose-built C inference engine that runs a 284B frontier model locally on a 128GB MacBook with a 1M-token context window.

  • What it is: ds4 is a purpose-built C inference engine by Redis creator antirez for running DeepSeek V4 Flash locally on Apple Silicon.
  • The model: DeepSeek V4 Flash is a 284B MoE with only 13B active parameters per token, 1M-token context, and MIT license.
  • Key trick: Asymmetric 2-bit quantization (~81 GB on disk) targets only routed experts, leaving shared weights at full precision to preserve tool-calling reliability.
  • Disk KV cache: Session state is persisted to SSD, so long-context agent sessions survive restarts without re-processing expensive prefills.
  • Performance: 26 t/s generation on an M3 Max MacBook Pro, 36 t/s on an M3 Ultra Mac Studio, at roughly 50W power draw.
  • Compatibility: Exposes OpenAI and Anthropic-compatible APIs; works with Claude Code, opencode, and Pi out of the box.

DwarfStar 4 (ds4) is a new open-source inference engine written in C by Salvatore Sanfilippo, better known as antirez, the creator of Redis. It does one thing: run DeepSeek V4 Flash, a 284-billion-parameter Mixture-of-Experts model, locally on Apple Silicon using Metal. The project landed on GitHub and immediately caught fire, accumulating thousands of stars through Hacker News and word of mouth alone, with no major marketing push.

The timing is not accidental. Antirez published ds4 on May 6, 2026, six days after Apple started shipping the M3 Ultra Mac Studio with 512 GB unified memory. Hardware caught up to the model the same month an engine appeared. The result is something that would have seemed implausible even a year ago: a quasi-frontier model running end-to-end on a personal machine, with full coding-agent support.

The model it runs

On April 24, 2026, DeepSeek shipped two open-weight MIT-licensed models: V4-Pro (1.6T params) and V4-Flash (284B), both with a 1M-token context window via the API. V4-Pro is a 1.6T-parameter MoE with 49B activated per token; V4-Flash is 284B total with 13B activated. The Flash variant is the one ds4 targets, and it punches well above its weight class.

Why Flash specifically? The README lays it out clearly:

  • Fewer active parameters mean faster inference than dense models of comparable quality.
  • Proportional thinking: in thinking mode, the reasoning section scales with problem complexity, making it far more practical than models that always produce long chains of thought.
  • Heavily compressed KV cache, which is the architectural detail that makes local long-context inference viable at all.
  • 1 million token context window with up to 384K output tokens.
  • Dual thinking/non-thinking modes, switchable at inference time.

The trick that makes it fit on a MacBook

Running a 284B model on consumer hardware requires aggressive compression. The quantizations are specific to the DS4 inference engine. Use q2 on 128 GB Mac machines, q4 on machines with 256 GB RAM or more, and pair either with MTP for optional speculative decoding.