This is the canonical, shareable quickstart for running DeepSeek V4 Flash through AFM's DwarfStar backend. AFM 0.9.16 accepts the Hugging Face repository ID directly, selects the largest compatible model GGUF that fits memory, and safely resumes interrupted downloads.
Before you start
- An Apple Silicon Mac with enough unified memory for this DeepSeek V4 configuration.
- At least 156 GB of free storage for the GGUF, plus working headroom.
- AFM 0.9.16 or newer.
- A fast, reliable connection. The first run downloads the model; later runs reuse the cache.
1. Install AFM
# AFM — Homebrew
brew install scouzi1966/afm/afmPyPI users can install the same release with pip install macafm==0.9.16.
2. Run from the repository
Pass the repository ID directly. AFM handles selection, download, validation, caching, and runtime detection:
afm mlx -w -m scouzi1966/DeepSeek-V4-Flash-0731-DwarfStar-GGUFAFM selects the largest model GGUF that fits its memory budget, recognizes the GGUF's deepseek4 architecture, and starts DwarfStar automatically. The -w flag starts the WebUI; open http://127.0.0.1:9999 after startup completes. If a repository has multiple model GGUFs, use --gguf-file <path> to choose one explicitly.
3. Put the model on an external disk
Use this variant when your internal disk does not have enough room. Replace /Volumes/edata2 with the mounted path of your disk.
mkdir -p /Volumes/edata2/models/huggingface-cache
HF_HUB_CACHE=/Volumes/edata2/models/huggingface-cache \
afm mlx -w -m scouzi1966/DeepSeek-V4-Flash-0731-DwarfStar-GGUFVerify the server
In another terminal, check the health endpoint and the active model:
curl -s http://127.0.0.1:9999/health
curl -s http://127.0.0.1:9999/v1/modelsKnow the boundary
- DwarfStar is a text-generation backend. Images, PDFs, audio,
--vlm, and--mediaare rejected. - This path does not provide tool calls, structured-output grammar, or token log probabilities.
- MLX-specific KV controls, MTP, EAGLE3, and MLX batch endpoints do not apply.
- Not every GGUF is compatible. This command names the validated DeepSeek V4 DwarfStar file explicitly.
Where to go next
For runtime selection, concurrency, prefix reuse, DSpark, sampling controls, and the full limitations matrix, read DwarfStar + DeepSeek V4. Release changes are tracked in What's new.