Instructions to use salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-GGUF # Run inference directly in the terminal: llama cli -hf salen-00/DeepSeek-V4-Flash-0731-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf salen-00/DeepSeek-V4-Flash-0731-GGUF # Run inference directly in the terminal: llama cli -hf salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-GGUF # Run inference directly in the terminal: ./llama-cli -hf salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf salen-00/DeepSeek-V4-Flash-0731-GGUF
Use Docker
docker model run hf.co/salen-00/DeepSeek-V4-Flash-0731-GGUF
- LM Studio
- Jan
- vLLM
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "salen-00/DeepSeek-V4-Flash-0731-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": "salen-00/DeepSeek-V4-Flash-0731-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/salen-00/DeepSeek-V4-Flash-0731-GGUF
- Ollama
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with Ollama:
ollama run hf.co/salen-00/DeepSeek-V4-Flash-0731-GGUF
- Unsloth Desktop
- Pi
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf salen-00/DeepSeek-V4-Flash-0731-GGUF
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "salen-00/DeepSeek-V4-Flash-0731-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with Docker Model Runner:
docker model run hf.co/salen-00/DeepSeek-V4-Flash-0731-GGUF
- Lemonade
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull salen-00/DeepSeek-V4-Flash-0731-GGUF
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-0731-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-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 salen-00/DeepSeek-V4-Flash-0731-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use salen-00/DeepSeek-V4-Flash-0731-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf salen-00/DeepSeek-V4-Flash-0731-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 "salen-00/DeepSeek-V4-Flash-0731-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"
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 "salen-00/DeepSeek-V4-Flash-0731-GGUF" \
--custom-provider-id llama-cpp \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-healthRun OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"DeepSeek-V4-Flash-0731-GGUF (hetero-v2)
Ablation-guided 'heterogeneous' GGUF quantization of DeepSeek-V4-Flash-0731.
95.8 GB single file. Fits 128 GB memory, leaving 32 GB for KV cache (150K tokens) to enable multi-turn sessions.
Quantization schema
Quantization schema derived from the Deepseek V4 Pro model's quantization recommendations (hence, heterogeneous), refined with ablation signal analysis. I was curious if the models have been trained on and thus have 'internalized' their own architecture such that they could advise an effective distribution.
Three-tier expert quantization, ranked by confabulation-routing ablation signal from a differential heatmap over the model's own expert activation patterns:
| Tensor group | Quant | BPW | Layers / notes |
|---|---|---|---|
| Routed experts (tier 1, hottest) | Q4_K | 4.5 | Layers 32, 40 |
| Routed experts (tier 2) | Q3_K | 3.4 | Layers 13, 26, 36, 42 |
| Routed experts (tier 3, default) | Q2_K | 2.6 | 35 remaining MoE layers |
| Shared experts | Q6_K | 6.6 | Active every token; 1 per layer |
| Attention projections | Q6_K | 6.6 | MLA critical path (compressors, indexer, Q/KV/O) |
| Embeddings | Q8_0 | 8.0 | Input representation fidelity |
| Output head | Q8_0 | 8.0 | Logit accuracy |
| Norms, gates, hyper-connections | F32 | 32.0 | Tiny tensors; kept exact |
Approach is verified by DSL architecture documents regarding MoE routing and attention architecture.
Layers 32 and 40 showed the highest confabulation-routing signal (routing decisions most likely to produce hallucinated output when degraded), so they get the most bits. Layers 13, 26, 36, 42 are the next tier. Everything else is sparse enough that Q2_K preserves quality.
How to run
Requires llama.cpp with DeepSeek-V4 support. Mainline llama.cpp gained V4 support in mid-2026; earlier builds may need the antirez fork.
llama-server \
-m DeepSeek-V4-Flash-0731-hetero-v2.gguf \
--ctx-size 4096 \
--n-gpu-layers 99 \
--port 8080
Minimum context size is 4096 due to MLA compressor bank working set requirements. 32,768 is enough for standard reasoning tasks.
Architecture
DeepSeek-V4-Flash is a Mixture-of-Experts transformer:
| Parameter | Value |
|---|---|
| Total parameters | ~284B |
| Activated per token | ~13B |
| Layers | 43 |
| Hidden size | 4096 |
| Attention heads | 64 |
| Routed experts | 256 per MoE layer, 6 active per token |
| Shared experts | 1 per layer (always active) |
| Vocabulary | 129,280 tokens |
| Max context | 1,048,576 tokens |
| Attention | MLA (Multi-head Latent Attention) with CSA + HCA hybrid |
| Expert routing | noaux_tc with sqrtsoftplus scoring + hash routing (3 layers) |
| KV compression | Per-layer ratios alternating 4x / 128x |
V4-specific features not in V3: hash routing tables (ffn_gate_tid2eid), MLA compressor banks, DSA indexer, hyper-connections (hc_*), attention sinks, grouped output projections.
Conversion pipeline
Two-phase conversion from the FP4/FP8 source weights:
- Phase 1 (
convert_hf_to_gguf.py): Dequantize FP4 experts and requantize to Q2_K/Q3_K/Q4_K by ablation tier. Base tensors (attention FP8, shared FP8, embeddings BF16) go to Q8_0. - Phase 2 (
llama-quantize): Requantize attention and shared expert Q8_0 down to Q6_K. Expert tiers and embeddings/output preserved via tensor-type override file.
Performance notes
Tested on Apple M5 Max, 128 GB unified memory:
- Generation speed comparable to uniform-quant at same expert BPW (~30 t/s)
- Output quality at API parity on qualitative benchmarks (math, translation, code, explanation); see the v1 report for methodology. v2 refines the expert tiering but uses the same evaluation approach
Credits
- DeepSeek Labs for the incredible open model
- Salvatore Sanfilippo (antirez) for the original llama.cpp V4 fork and the
--deepseek4-expert-outtypesconversion flag
- Downloads last month
- 71
We're not able to determine the quantization variants.
Model tree for salen-00/DeepSeek-V4-Flash-0731-GGUF
Base model
deepseek-ai/DeepSeek-V4-Flash-0731
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp# Start a local OpenAI-compatible server: llama serve -hf salen-00/DeepSeek-V4-Flash-0731-GGUF