@mitsuhiko: Nice! @antirez merged my tool parameter streaming changes into ds4. Means you can now just install the pi extension and…
Summary
Developer mitsuhiko released an open-source Pi extension that integrates with ds4 to streamline running DeepSeek V4 Flash locally on macOS. The tool automates model downloads, quantization selection based on RAM, and server lifecycle management for a seamless local LLM experience.
View Cached Full Text
Cached at: 05/09/26, 03:42 AM
Nice! @antirez merged my tool parameter streaming changes into ds4. Means you can now just install the pi extension and you get great behavior from ds4 out of the box. Moved the extension into a separate repo now. You “just” need a 128GB Mac now. https://t.co/DuOLrddPSi
mitsuhiko/pi-ds4
Source: https://github.com/mitsuhiko/pi-ds4
pi-ds4
Pi provider extension for running antirez/ds4 as a local DeepSeek V4 Flash model. The goal here is to see how good the UX and behavior can be around local models.
The extension registers the ds4/deepseek-v4-flash model, starts ds4-server
on demand, downloads/builds the runtime if needed, keeps a per-pi-process lease,
and stops the server via a bundled watchdog when no clients are left.
Requirements and Behavior
You will need a mac with at least 128GB of RAM. The way this is set up right now is that it will install the 2-bit quantized model if you have 128GB of RAM and it will pick the 4-bit quantized model if you have 256MB or more.
If you are signed into huggingface then your token is used for faster downloads. The server is compiled/started and models are downloaded automatically on first use.
Install
pi install https://github.com/mitsuhiko/pi-ds4
For local development from this checkout, pass the path to an existing ds4 server checkout:
./install-pi-extension-local.sh /path/to/antirez-ds4-checkout
If ~/.pi/ds4/support already exists and points elsewhere, use --force to
move it aside and install a symlink to the checkout you passed. Any existing
gguf/*.gguf model files (and resumable .gguf.part downloads) are preserved
into the new checkout first, using APFS clone-on-write copies on macOS when
available.
Then restart pi or run /reload.
Runtime layout
Runtime state is kept under ~/.pi/ds4:
support/— shallow checkout ofhttps://github.com/antirez/ds4(mainby default)kv/— on-disk KV cacheclients/— active pi process leaseslog— build/download/server/watchdog log
The watchdog is bundled in this package (ds4-watchdog.sh), not expected to
exist in the ds4 runtime checkout.
Configuration
Environment overrides:
DS4_SUPPORT_REPO: runtime repo URL (defaulthttps://github.com/antirez/ds4)DS4_SUPPORT_BRANCH: runtime branch (defaultmain)DS4_RUNTIME_DIR: use an existing ds4 checkout instead of~/.pi/ds4/supportDS4_MODEL_QUANT: forceq2orq4(otherwise picked from system memory)DS4_READY_TIMEOUT_MS: server startup timeoutDS4_SERVER_BINARY: customds4-serverbinary path
Use /ds4 inside pi to show the live ds4 log.
Similar Articles
@ttasanen: Just fired up DS4 by @antirez on my Mac Studio M3 Ultra 256GB and man, it’s seriously impressive. A clean, purpose-buil…
DS4 is a specialized inference engine by antirez designed to run DeepSeek V4 Flash locally on high-end Mac hardware, featuring optimized KV cache handling and 1M context support.
DeepSeek V4.1 Flash 1017 Support for ds4 · PR #1225 · antirez/ds4
antirez's DwarfStar (ds4) project adds support for DeepSeek V4.1 Flash in PR #1225, expanding its specialized native inference engine for running open-weight models like DeepSeek, GLM, and Qwen on consumer hardware across Metal, CUDA, and ROCm.
@BrianRoemmele: Another day and another full frontier model running on your computer. Been teething DeepSeek V4 Flash on over 60 employ…
Brian Roemmele reports that DeepSeek V4 Flash (304B, 1M context) now runs locally on Apple Silicon via the ds4 engine, sharing GGUF quantized builds with a fresh imatrix. The Hugging Face repo provides installation instructions and notes that these files are ds4-specific, not for llama.cpp.
A few words on DS4
Antirez announces DwarfStar 4 (DS4), a local AI tool that runs DeepSeek v4 Flash with asymmetric 2/8 bit quantization on high-end consumer hardware, achieving near-frontier performance. He discusses the project's rapid popularity, future plans for model updates and distributed inference, and the significance of local AI for serious tasks.
DS4
Salvatore Sanfilippo released DS4, a project enabling DeepSeek V3 (referred to as V4 in text) Flash to run with a 1M context window on Mac Metal hardware, with potential for DGX and AMD support.