Instructions to use unsloth/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 unsloth/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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- Ollama
How to use unsloth/DeepSeek-V4-Flash-0731-GGUF with Ollama:
ollama run hf.co/unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
- Unsloth Studio
How to use unsloth/DeepSeek-V4-Flash-0731-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 unsloth/DeepSeek-V4-Flash-0731-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 unsloth/DeepSeek-V4-Flash-0731-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/DeepSeek-V4-Flash-0731-GGUF to start chatting
- Pi
How to use unsloth/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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
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": "unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use unsloth/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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use unsloth/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 unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
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 "unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL" \ --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 unsloth/DeepSeek-V4-Flash-0731-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/DeepSeek-V4-Flash-0731-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-0731-GGUF-UD-Q4_K_XL
List all available models
lemonade list
KLD Benchmarks + why Q8_K_XL vs MXFP4 naming
Hey folks - for folks asking:
- Why did we name the MXFP4 quant "Q8_K_XL" and not MXFP4
- Why other folks' "lossless" quants are 155GB vs our Q8_K_XL at 162GB
- Is FP8 and Q8_0 equivalent?
FP8 and Q8_0 are NOT bitwise equivalent - we checked the RMSE and it's not 0 at all. We did KLD on Q4_K_XL (the 155GB one other folks ship), and it's 96% top-1% agreement, so it's NOT lossless. llama.cpp does not have a native FP8 data-type, so BF16 is a must.
We could have named it MXFP4, but Q8_K_XL is the correct naming convention - we thought of BF16, but that's wrong. Also it's not all MXFP4, but MXFP4 + FP8
So when you see other people's quants at 155GB - this is not lossless and if they communicate that it's lossless - this is wrong. Converting FP8 to Q8_0 is not a lossless operation but lossy.
Full KLD table:
| quant | size GB | mean KLD | KLD 99% | KLD 99.9% | PPL | top-1 % |
|---|---|---|---|---|---|---|
| UD-IQ1_S | 82.5 | 0.66155 | 6.5134 | 11.3667 | 8.0932 | 72.30 |
| UD-IQ1_M | 86.9 | 0.58962 | 6.0813 | 10.4555 | 7.7384 | 74.08 |
| UD-IQ2_XXS | 90.9 | 0.48487 | 5.3472 | 9.7837 | 7.0909 | 76.60 |
| UD-IQ2_M | 90.9 | 0.48388 | 5.3461 | 9.7245 | 7.0894 | 76.56 |
| UD-Q2_K_XL | 96.8 | 0.40766 | 4.7839 | 9.0557 | 6.6782 | 78.57 |
| UD-IQ3_XXS | 104.2 | 0.30789 | 3.8147 | 7.7732 | 6.1972 | 81.93 |
| UD-IQ3_S | 116.1 | 0.26895 | 3.4845 | 7.3190 | 6.0266 | 83.06 |
| UD-Q3_K_M | 128.1 | 0.15734 | 2.1807 | 4.9571 | 5.7028 | 87.06 |
| UD-Q3_K_XL | 128.2 | 0.15751 | 2.1456 | 4.9708 | 5.7085 | 87.05 |
| UD-IQ4_XS | 136.7 | 0.11525 | 1.5929 | 3.9121 | 5.5522 | 88.79 |
| UD-IQ4_NL | 136.7 | 0.11525 | 1.5929 | 3.9121 | 5.5522 | 88.79 |
| UD-Q4_K_XL | 155.1 | 0.01324 | 0.1675 | 0.5512 | 5.3380 | 96.04 |
| UD-Q8_K_XL | 161.9 | -0.00000 | 0.0000 | 0.0001 | 5.3322 | 100.00 |
Note UD-IQ3_XXS has been updated to reduce max KLD, and also some 3-bit quants are smaller in size now
Thanks for the clarification! In terms of activated parameters in Gbs what difference we are looking at between UD-Q4_K_XL and UD-Q8_K_XL? If it is +7Gb per token then probably I can live with 96% top1 agreement. It would be nice if you can state explicitly this parameter for all quantizations.
@perelmanych UD-Q4_K_XL and UD-Q8_K_XL are virtually equivalent, except UD-Q8_K_XL for attention, other non MoE layers are BF16, whilst UD-Q4_K_XL is in Q8_0