Instructions to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf # Run inference directly in the terminal: llama cli -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf # Run inference directly in the terminal: llama cli -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf # Run inference directly in the terminal: ./llama-cli -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Use Docker
docker model run hf.co/Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
- LM Studio
- Jan
- vLLM
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
- Ollama
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Ollama:
ollama run hf.co/Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
- Unsloth Studio
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf to start chatting
- Pi
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Docker Model Runner:
docker model run hf.co/Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
- Lemonade
How to use Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf-{{QUANT_TAG}}List all available models
lemonade list
DeepSeek-V4-Flash-0731 — 2-bit imatrix GGUF for DwarfStar
A 2-bit, importance-matrix-guided GGUF quantization of
deepseek-ai/DeepSeek-V4-Flash-0731,
built with the DwarfStar (ds4) toolchain.
Intended for 96 GB and 128 GB machines that cannot hold a 4-bit build.
| File | DeepSeek-V4-Flash-0731-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-imatrix.gguf |
| Size | 86,720,111,520 bytes (80.8 GiB) |
| Resident model | 80.76 GiB |
| Context overhead | ~0.86 GiB at --ctx 32768 |
| Architecture | 43 layers, 256 routed experts (top-6), 1 shared expert |
Quantization recipe
| Tensor group | Type |
|---|---|
Routed experts, gate (w1) / up (w3) |
IQ2_XXS |
Routed experts, down (w2) |
Q2_K |
| Attention projections | Q8_0 |
| Shared experts | Q8_0 |
| Output | Q8_0 |
| HC / compressor / indexer | F16 |
This matches the established DwarfStar Flash q2-imatrix recipe, applied to the
0731 checkpoint. The 0731 weights ship as fp4 routed experts (I8 packed E2M1
with F8_E8M0 block-32 scales) and fp8 dense tensors; deepseek4-quantize
dequantizes both to f32 before requantizing.
Importance matrix
Activation statistics were collected with the ds4 runtime itself, hooking the
layer-major Metal prefill graph, so the counts come from the real DS4 inference
graph rather than a proxy implementation.
- Dataset:
gguf-tools/imatrix/dataset/rendered_prompts.txt(DS4-rendered chat prompts: source review, long context, agent/tool-call DSML, prose tasks, and benchmark prompts, in both thinking and non-thinking forms) - Budget: 2,720 prompts / 1,496,249 tokens / 386,032,242 routed-expert observations
- Output: 129 entries (43 layers × 3 routed tensors), one packed vector per expert
For gate/up the collector records squared FFN-normalized input activation; for down, the squared route-weighted SwiGLU row.
Measured effect of the imatrix
Scored against 100 official DeepSeek V4 Flash continuations by target-token negative log likelihood, comparing this build to an otherwise identical build of the same checkpoint quantized without an imatrix:
| Build | avg NLL |
|---|---|
| 0731 Q2, no imatrix | 0.579809 |
| 0731 Q2, imatrix (this file) | 0.571552 |
| Relative change | -1.42% |
Per-case wins: 54 imatrix / 46 no-imatrix.
Both builds are the same checkpoint, so this isolates the imatrix contribution. Note that the reference continuations were collected from an earlier Flash checkpoint, which raises the absolute NLL for both builds equally; only the relative difference is meaningful here.
Usage
git clone https://github.com/antirez/ds4
cd ds4 && make
./ds4 -m DeepSeek-V4-Flash-0731-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-imatrix.gguf \
-p "Write a C function that reverses a string in place."
Or serve it:
./ds4-server -m DeepSeek-V4-Flash-0731-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-imatrix.gguf --ctx 100000
Observed on an Apple M5 Max (128 GB, Metal): prefill 86.9 t/s, generation 29.6 t/s at short context. Throughput falls as context grows.
Caveats
- 2-bit routed experts are a real quality tradeoff. If you have the RAM for a 4-bit or mixed q2/q4 build, prefer it.
- Only the routed expert tensors are 2-bit; attention, shared experts, and the
output head stay at
Q8_0, and the HC/compressor/indexer path stays atF16. - This file requires DwarfStar. It is not a llama.cpp-compatible GGUF: the DS4
architecture, compressed attention, and packed routed-expert layout are
specific to the
ds4runtime.
License
MIT, inherited from the base model.
- Downloads last month
- -
We're not able to determine the quantization variants.
Model tree for Rednalreden/DeepSeek-V4-Flash-0731-dwarfstar-q2-gguf
Base model
deepseek-ai/DeepSeek-V4-Flash-0731