notatestuser/ds4-control
macOS menubar app for fast local DeepSeek V4.1, with 1M context.
DS4 Control – macOS menu‑bar UI for the DeepSeek V4 model (via the ds4 server)
What it is – A native Swift menu‑bar application that lets you run, monitor, and interact with a local ds4‑server process that serves DeepSeek V4 (the Pro and Flash variants). The app does not perform inference itself; it only manages the external server, downloads the model files, and provides quick‑launch shortcuts to chat or coding agents.
Why it matters – Running a 100‑GB‑plus LLM on a Mac requires careful handling of RAM, GPU‑wired memory limits, and process supervision. DS4 Control automates those chores, shows live resource usage, and prevents you from starting a model that would exceed your machine’s Metal wired‑memory budget.
Core functionality
| Feature | What you get |
|---|---|
| Server lifecycle | Start/stop the ds4‑server binary, watch its stderr for the listening on http://… line, poll /v1/models for health, and gracefully shut it down. |
| Model selector | Choose V4 Pro (0813) or V4 Flash (0731). The UI checks your RAM and Metal wired‑limit and disables options that cannot fit. |
| Built‑in downloader | Parallel, resumable download of the GGUF model files with a live progress bar. No external tools needed. |
| Resource widgets | Mini gauges in the menu‑bar popup for unified memory, GPU, CPU, and power/ANE usage, refreshed every 2 seconds. |
| One‑click agents | Buttons to launch a chat window, Claude Code, or Pi (local “agentic coding” tools) that talk to the running model. |
| 1 M‑token context | Configurable up to one million tokens (default for Pro; lower defaults for Flash on smaller RAM). |
| Startup integration | Option to auto‑start the server when macOS boots. |
| Safety gating | If the required Metal wired memory would be exceeded, the app shows the exact sysctl iogpu.wired_limit_mb=… command needed and a helper dialog. |
Who should use it
- Mac‑silicon power users who have 96 GiB + of RAM and want to run DeepSeek V4 locally.
- Developers needing a quick way to spin up a local LLM for coding assistance (Claude Code, Pi) without fiddling with command‑line scripts.
- Researchers who want to experiment with different reasoning‑effort levels (
Standard,Instant,Max Think) and see real‑time system impact.
Installation (quick)
brew install --cask ds4-control # Homebrew Cask provides a signed .dmg
Or download the latest signed .dmg from the GitHub releases page, or install via Homebrew Cask URL.
Building from source (for contributors)
- Fetch the submodule that contains the upstream
ds4server:git submodule update --init --recursive - Patch and compile the server (required for the
THINK_MAXfeature):bash scripts/apply-ds4-patches.sh make -C external/ds4 -j ds4-server - Run the app against the built server:
DS4_DIR="$PWD/external/ds4" swift run - To create a distributable bundle:
bash build.sh # signs with your Apple Development certificate or falls back to ad‑hoc
How it works under the hood
SupervisorService– SwiftProcesswrapper that launchesds4‑server, parses its readiness line, polls the health endpoint, and handles graceful termination.MetricsManager– Samples CPU, memory, GPU, and power via Mach, IOKit, and the privateIOReportAPI every 2 seconds, feeding the UI widgets.Feasibility– Calculates whether the selected model fits in RAM and the Metal wired‑memory limit, derives a safe default context size, and presents the user with the requiredsysctlcommand when needed.- All heavy‑logic (feasibility math, resumable chunk downloader, state machine) is pure Swift and covered by unit tests.
License
MIT – see the repository’s LICENSE file.
Bottom line – DS4 Control is a polished, signed macOS utility that removes the manual plumbing required to run DeepSeek V4 locally, giving you a single‑click way to start the model, monitor system health, and launch chat or coding agents.
Related
- Project
- Project
- Project
- Project
- Dispatch