Instructions to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS # Run inference directly in the terminal: llama cli -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS # Run inference directly in the terminal: llama cli -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS # Run inference directly in the terminal: ./llama-cli -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS # Run inference directly in the terminal: ./build/bin/llama-cli -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
Use Docker
docker model run hf.co/Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
- LM Studio
- Jan
- vLLM
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-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": "Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
- Ollama
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with Ollama:
ollama run hf.co/Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
- Unsloth Desktop
- Pi
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
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": "Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with Docker Model Runner:
docker model run hf.co/Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
- Lemonade
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF-IQ2_XXS
List all available models
lemonade list
- Hermes Agent
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
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 Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS
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 "Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF:IQ2_XXS" \ --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"
DeepSeek V4 Flash 0731 — L37-42 Q4_K, Joint-Finetuned MTP (GGUF)
A quantized GGUF of DeepSeek V4 Flash (0731 checkpoint) with a jointly finetuned inline Multi-Token Prediction (MTP) drafter. This is the 0731 revision of DeepSeek V4 Flash. Unlike the released Flash GGUFs, this build embeds the 3-stage MTP drafter directly in the main model — no separate support/sidecar file is required. It is intended for the DwarfStar inference engine, which is the only loader that understands this layout.
File name (HF convention):
DeepSeek-V4-Flash-IQ2_XXS-L37-42Q4K-MTP-JointFT-imatrix-0731.gguf
Fine-tuning data
The joint fine-tuning dataset is derived from questions posed to Fable 5, Opus 4.8, and Opus 4.7. Coding repositories from GitHub were part of the MTP drafter re-training corpus, not of this joint fine-tuning dataset.
Model details
| Architecture | DeepSeek V4 Flash (deepseek4), 43 layers |
| Base | deepseek-ai/DeepSeek-V4-Flash, 0731 checkpoint |
| Revision | 0731 |
| Parameters | 284B total / 13B active (base); ~304B logical incl. MTP stages |
| Context length | 1,048,576 tokens (train) |
| Attention | 64 heads, 1 KV head, head_dim 512, sliding window 128 |
| Experts | 256 routed, 6 used per token |
| MTP drafter | 3 inline stages, block size 5, target layers 40–42 |
| File size | 96.47 GiB |
| License | MIT (base DeepSeek-V4-Flash is MIT) |
Quantization recipe
Asymmetric mixed quantization: only the routed MoE experts are aggressively compressed; projections, routing, and output are kept high-precision to preserve quality. imatrix-tuned.
| Component | Type |
|---|---|
| Layers 37–42 routed experts | Q4_K (closest to output, higher quality) |
| Layers 0–36 routed gate/up experts | IQ2_XXS |
| Layers 0–36 routed down experts | Q2_K |
| Attention projections | Q8_0 |
| Shared experts | Q8_0 |
| Output head | Q8_0 |
| Norms / HC / compressor / indexer | F16 / F32 |
Tensor-type breakdown (from ds4 --inspect):
| Type | Tensors | Size |
|---|---|---|
iq2_xxs |
80 | 41.25 GiB |
q2_k |
40 | 26.25 GiB |
q4_k |
18 | 20.25 GiB |
q8_0 |
376 | 6.66 GiB |
f16 |
366 | 2.05 GiB |
f32 |
527 | ~0 GiB |
i32 |
3 | ~0 GiB |
Inline MTP drafter (the distinguishing feature)
The 3-stage MTP drafter is embedded in the main GGUF and jointly finetuned
with the main model (mtp/dspark metadata: stages=3, block=5,
target_layers=40,41,42). Because the drafter ships inside the model, you do
not need a separate --mtp support GGUF. DwarfStar binds it automatically
at load:
ds4: embedded_mtp stages=3 bound_stages=3 source=main_model block_size=5 draft=1
Current status of MTP drafting on this build: speculative decoding is
available via --mtp-draft N but is presently net-negative on this
finetuned checkpoint — verification costs more than accepted drafts save
(measured ~31 t/s with draft-2 vs ~37 t/s plain at 13k context, byte-identical
output). The engine therefore defaults to --mtp-draft 1 (plain decoding).
Drafting remains opt-in for experimentation as drafter acceptance improves.
Intended use
- Local inference of DeepSeek V4 Flash on high-memory Apple Silicon (Metal), NVIDIA CUDA, or ROCm, via the DwarfStar engine.
- Fits 128 GB unified-memory machines (96.47 GiB weights + KV/scratch).
- Research into inline/joint MTP speculative decoding.
Out of scope: use with generic GGUF loaders (llama.cpp etc.) — this file requires the DwarfStar engine's tensor layout and inline-MTP handling.
Performance (DwarfStar, Metal)
Single-run, --ctx 32768, greedy, Mac Studio M3 Ultra 512 GB:
| Context | Prefill | Generation (default) | Generation (draft-2) |
|---|---|---|---|
| ~13k tokens | ~470 t/s | ~37 t/s | ~31 t/s |
Warm KV-cache reuse (disk checkpoint, alignment off) reduces a repeat 18k-turn prefill from ~36.8 s to ~3.4 s.
How to run
# Download (once available in antirez/deepseek-v4-gguf)
./download_model.sh q2-q4-mtp-imatrix
# Plain decoding (default, currently fastest)
./ds4 -m gguf/DeepSeek-V4-Flash-IQ2_XXS-L37-42Q4K-MTP-JointFT-imatrix-0731.gguf --temp 0
# Experiment with MTP drafting (currently net-negative, opt-in)
./ds4 -m gguf/DeepSeek-V4-Flash-IQ2_XXS-L37-42Q4K-MTP-JointFT-imatrix-0731.gguf \
--mtp-draft 2 --temp 0
Limitations & biases
Inherits DeepSeek V4 Flash's limitations and biases. Quantization is lossy; the 2-bit routed-expert compression is imatrix-tuned to preserve quality but is not bit-exact with the FP8 base. MTP drafting is experimental and currently slower than plain decoding on this checkpoint.
License
MIT. Derived from deepseek-ai/DeepSeek-V4-Flash (MIT).
Citation
@misc{deepseekai2026deepseekv4,
title={DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence},
author={DeepSeek-AI},
year={2026},
url={https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash}
}
- Downloads last month
- 95
2-bit
Model tree for Deviad/DeepSeek-V4-Flash-0731-MTP-JointFT-GGUF
Base model
deepseek-ai/DeepSeek-V4-Flash