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.
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
| Dimensions | Changes | Implications for AI automation | Recommended actions |
|---|---|---|---|
| Cost | Run locally with zero API fees | Complete elimination of inference costs for automated workflows | Deploy local Agents instead of cloud API calls |
| Context | 1 million Tokens (supports disk KV cache) | Can handle complete project code bases and long documents | Make full use of long contexts when designing Agent workflows |
| Performance | M3 Ultra: 36.86 t/s generation (q2) | Close to cloud inference speed | Latency-sensitive tasks can be hosted locally |
| Privacy | Everything runs locally, data never leaves the device | No external APIs required for sensitive data processing | Migrate 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.
# 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}'AI
- ** API ** Pipeline , AI
- ****100 Token Agent 「」、,
- ****(、) API,
- **Agent **n8n + DeepSeek
,DeepSeek V4、Claude Code、OpenAI、ChatGPT、Anthropic、n8n、Opencode、Hermes Agent
Reference link
- GitHub repository: antirez/ds4
- Hacker News Discussion: news.ycombinator.com
- Hugging Face model: huggingface.co/antirez/deepseek-v4-gguf
Internal link guidance
Topic hub
AI Coding Tools Hub (2026)
From Copilot pricing changes to Claude Code + DeepSeek cost-saving setups—one place to compare tools, read explainers, and follow tutorials.
Explore AI Coding Tools Hub (2026) →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services