Instructions to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="andreaborio/DeepSeek-V4-Flash-DS4-GGUF", filename="DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF # Run inference directly in the terminal: llama cli -hf andreaborio/DeepSeek-V4-Flash-DS4-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf andreaborio/DeepSeek-V4-Flash-DS4-GGUF # Run inference directly in the terminal: llama cli -hf andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF # Run inference directly in the terminal: ./llama-cli -hf andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf andreaborio/DeepSeek-V4-Flash-DS4-GGUF
Use Docker
docker model run hf.co/andreaborio/DeepSeek-V4-Flash-DS4-GGUF
- LM Studio
- Jan
- vLLM
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "andreaborio/DeepSeek-V4-Flash-DS4-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": "andreaborio/DeepSeek-V4-Flash-DS4-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/andreaborio/DeepSeek-V4-Flash-DS4-GGUF
- Ollama
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with Ollama:
ollama run hf.co/andreaborio/DeepSeek-V4-Flash-DS4-GGUF
- Unsloth Studio
How to use andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for andreaborio/DeepSeek-V4-Flash-DS4-GGUF to start chatting
- Pi
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf andreaborio/DeepSeek-V4-Flash-DS4-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": "andreaborio/DeepSeek-V4-Flash-DS4-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf andreaborio/DeepSeek-V4-Flash-DS4-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 "andreaborio/DeepSeek-V4-Flash-DS4-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 andreaborio/DeepSeek-V4-Flash-DS4-GGUF with Docker Model Runner:
docker model run hf.co/andreaborio/DeepSeek-V4-Flash-DS4-GGUF
- Lemonade
How to use andreaborio/DeepSeek-V4-Flash-DS4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull andreaborio/DeepSeek-V4-Flash-DS4-GGUF
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-DS4-GGUF-{{QUANT_TAG}}List all available models
lemonade list
DeepSeek V4 Flash DS4 Q2 Imatrix
This repository is a checksum-preserving mirror of the DS4-native DeepSeek V4
Flash Q2 imatrix artifact published by
antirez/deepseek-v4-gguf
at revision 9170bf42beb77f38006e016503ecace31f2bd9a0.
The quantization was produced by antirez for the
ds4 inference engine. This mirror is
maintained under andreaborio for availability and integration testing; it
does not claim independent authorship of the quantization.
Verified artifact
| Property | Value |
|---|---|
| File | DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix.gguf |
| Size | 86,720,111,488 bytes (80.76 GiB) |
| SHA-256 | efc7ed607ff27076e3e501fc3fefefa33c0ed8cf1eff483a2b7fdc0c2e616668 |
| Base model | deepseek-ai/DeepSeek-V4-Flash |
| Source revision | 9170bf4 |
The mirror is copied server-side through Hugging Face Xet and accepted only when its Hub-reported size and LFS SHA-256 exactly match the source pin.
Quantization layout
- routed expert gate/up tensors:
IQ2_XXS; - routed expert down tensors:
Q2_K; - attention projections, shared experts, and output head:
Q8_0; - embedding, router, indexer, compressor, and hyper-connection tensors:
selected
F16/F32types; - routed experts use the published DS4 activation imatrix.
This mixed layout spends precision on routing and shared/dense paths while compressing the much larger routed-expert payload.
Run locally
Use the current andreaborio/ds4 main branch on Apple Silicon:
git clone https://github.com/andreaborio/ds4.git
cd ds4
make -j
./ds4 \
--metal --power 100 --ssd-streaming \
-m /absolute/path/to/DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix.gguf \
--ctx 8192
On a 64 GB Mac, SSD streaming is required. DSBox applies its guarded adaptive cache policy and monitors memory pressure and swap while the runtime is active. The 128 GB class is the more comfortable target for this 80.76 GiB artifact.
DSBox
The root dsbox.json makes the mirror explicitly installable by DSBox while
leaving the checksum-pinned DwarfStar source as the catalog's recommendation.
Downloads remain explicit, resumable, and pinned to one Hub revision.
Retained reference measurements
The current DSBox documentation records these bounded runs with this exact 86.72 GB GGUF:
| Host | Workload | Generation throughput |
|---|---|---|
| MacBook Pro M5 Pro, 64 GB | Two DSBox API requests, 22-23 prompt + 64 output tokens | 9.88 / 12.86 t/s |
| MacBook Pro M5 Pro, 64 GB | ds4-bench, 128 prompt + 64 decode tokens |
13.05 / 13.59 t/s |
These are measured bounded workloads, not universal throughput guarantees.
License and attribution
The source repository declares MIT. DeepSeek retains the base-model copyright; the GGUF is redistributed under the base model's release terms. Quantization credit belongs to antirez and the DS4 project.
- Downloads last month
- 98
We're not able to determine the quantization variants.
Model tree for andreaborio/DeepSeek-V4-Flash-DS4-GGUF
Base model
deepseek-ai/DeepSeek-V4-Flash