WayToClawEarn
Medium impactHacker News / GitHub

DeepSeek V4 Flash local engine ds4.c open source: MacBook running 284B model

Redis author antirez releases ds4.c - a local inference engine specially built for DeepSeek V4 Flash. It only requires 128GB of MacBook memory to run the 284B MoE model, supports 1 million Token contexts and disk KV cache, and reduces the cost of local AI encoding agents to zero.

Edisen Lu · WayToClawEarnVia Hacker News / GitHubPublished May 8, 2026Updated Sep 28, 2026

Reviewed from public sources · AI-assisted drafting under editorial oversight. How we work · Original source

Public-source compilation

Synthesized from public posts/docs. Prefer the original source for primary claims.

How we review content · Primary source · Hacker News / GitHub

Core conclusion

Redis founder Salvatore Sanfilippo (antirez) releases ds4.c - a native Metal inference engine built specifically for DeepSeek V4 Flash (284B MoE). It can not only run hundreds of billions of parameter models smoothly on MacBook, but also has a built-in OpenAI/Anthropic compatible API server, which can directly replace the cloud API to drive the local AI Agent workflow. For content creators and automation developers, this means a critical shift: high-quality AI coding capabilities move from "monthly paid API" to "local zero-cost deployment."

Key Points

  • Release time: 2026-05-07
  • Model size: DeepSeek V4 Flash 284B parameters (only 4B active), only 128GB RAM after 2-bit quantization
  • Core Innovation: Disk KV cache solution, treating KV cache as a "first-class disk citizen", making local running of 1 million Token context a reality for the first time
  • Compatibility: Natively supports OpenAI / Anthropic API format, and can be directly connected to mainstream Agent tools such as Claude Code, Opencode, and Pi.

Background: Redis author’s next project

antirez open sourced ds4.c on GitHub - a "deliberately narrow" inference engine that only does one thing: let DeepSeek V4 Flash run efficiently on Apple Silicon (Metal). This project does not contain the GGUF universal loader. It is not a package of llama.cpp, but a Metal graph executor written from scratch for the DS4 model structure.

After the project was released, it quickly received 500+ GitHub Stars and 260+ Hacker News discussions, and the community responded enthusiastically - because it solves several core pain points of local AI inference.

Key Impact

DimensionsChangesImplications for AI automationRecommended actions
CostRun locally with zero API feesComplete elimination of inference costs for automated workflowsDeploy local Agents instead of cloud API calls
Context1 million Tokens (supports disk KV cache)Can handle complete project code bases and long documentsMake full use of long contexts when designing Agent workflows
PerformanceM3 Ultra: 36.86 t/s generation (q2)Close to cloud inference speedLatency-sensitive tasks can be hosted locally
PrivacyEverything runs locally, data never leaves the deviceNo external APIs required for sensitive data processingMigrate high-compliance-risk inference tasks locally

Core technology innovation of ds4.c

antirez has made several noteworthy innovative designs in ds4.c:

1. Disk KV Cache

Traditional inference engines place all the KV cache in RAM, but the KV cache compression rate of DS4 V4 Flash is extremely high. Combined with the high-speed SSD of MacBook, antirez proposed the concept that "KV cache should be a first-class disk citizen." ds4-server will automatically persist the session's KV cache to a disk file. Even if the server is restarted, subsequent requests can reuse the last pre-populated results. This means efficient servicing of multiple Agent sessions with significantly reduced hot start overhead for each session.

2. 2-bit asymmetric quantization

The 2-bit quantization scheme of DS4 V4 Flash is not a simple compression: only the routing MoE expert layer is quantized (IQ2_XXS for up/gate, Q2_K for down), and the shared expert, projection layer and routing layer maintain the original accuracy. This allows the 284B model to run near lossless results on a MacBook with 128GB RAM.

3. Native Agent API support

ds4-server supports both OpenAI and Anthropic API formats, including advanced features such as Tool Calling, Streaming, and Thinking Mode, and can directly interface with Agent tools such as Claude Code, Opencode, and Pi.

terminal

# OpenAI
curl http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
 -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":" Redis 。"}],"stream":true}'

ds4.c inference engine running on MacBook

AI

  1. ** API ** Pipeline , AI
  2. ****100 Token Agent 「」、,
  3. ****(、) API,
  4. **Agent **n8n + DeepSeek

,DeepSeek V4、Claude Code、OpenAI、ChatGPT、Anthropic、n8n、Opencode、Hermes Agent

Reference link

Internal link guidance

deepseeksecurityai-agentmeta

View source →

Educational reference only: cases summarize public sources and may use AI-assisted drafting under editorial review. Not financial advice; outcomes are not guaranteed.