Instructions to use antirez/deepseek-v4-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use antirez/deepseek-v4-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="antirez/deepseek-v4-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
- llama.cpp
How to use antirez/deepseek-v4-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf antirez/deepseek-v4-gguf:F32 # Run inference directly in the terminal: llama-cli -hf antirez/deepseek-v4-gguf:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf antirez/deepseek-v4-gguf:F32 # Run inference directly in the terminal: llama-cli -hf antirez/deepseek-v4-gguf:F32
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 antirez/deepseek-v4-gguf:F32 # Run inference directly in the terminal: ./llama-cli -hf antirez/deepseek-v4-gguf:F32
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 antirez/deepseek-v4-gguf:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf antirez/deepseek-v4-gguf:F32
Use Docker
docker model run hf.co/antirez/deepseek-v4-gguf:F32
- LM Studio
- Jan
- vLLM
How to use antirez/deepseek-v4-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "antirez/deepseek-v4-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": "antirez/deepseek-v4-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/antirez/deepseek-v4-gguf:F32
- Ollama
How to use antirez/deepseek-v4-gguf with Ollama:
ollama run hf.co/antirez/deepseek-v4-gguf:F32
- Unsloth Studio new
How to use antirez/deepseek-v4-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 antirez/deepseek-v4-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 antirez/deepseek-v4-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for antirez/deepseek-v4-gguf to start chatting
- Pi new
How to use antirez/deepseek-v4-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf antirez/deepseek-v4-gguf:F32
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": "antirez/deepseek-v4-gguf:F32" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use antirez/deepseek-v4-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf antirez/deepseek-v4-gguf:F32
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 antirez/deepseek-v4-gguf:F32
Run Hermes
hermes
- Docker Model Runner
How to use antirez/deepseek-v4-gguf with Docker Model Runner:
docker model run hf.co/antirez/deepseek-v4-gguf:F32
- Lemonade
How to use antirez/deepseek-v4-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull antirez/deepseek-v4-gguf:F32
Run and chat with the model
lemonade run user.deepseek-v4-gguf-F32
List all available models
lemonade list
Server doesnt seem to work
I've tried to load the q4 quant using ds4-server, and when I try to query it i dont get a response, nothing shows in the server window, so I'm thinking there's a connection issue? Although I can successfully retrieve the model list from it, it just wont return text when I send it a query.
Try ./ds4 command line utility to see if the inference is working. What Mac version / RAM amount? Thanks.
IMPORTANT: this quants ONLY WORK with DS4 inference engine
It works if I run ds4 with a query, mac is an m3 ultra 256gb ram, running the q4 quant. Models are returned, but no text is.
Running the server using:
./ds4-server --ctx 81920 --kv-disk-dir /tmp/ds4-kv --kv-disk-space-mb 8192 --port 8072
Here's what I get when I run ds4
ds4 % ./ds4 -p "Explain Redis streams in one paragraph."
ds4: context buffers 1061.71 MiB (ctx=32768, backend=metal, prefill_chunk=2048, raw_kv_rows=2304, compressed_kv_rows=8194)
ds4: requesting Metal residency (may take tens of seconds)... done
ds4: warming Metal model views... done
ds4: Metal model views created in 3.255 ms, residency requested in 1017.287 ms, warmup 10.323 ms (mapped 157001.67 MiB from offset 5.08 MiB)
ds4: Metal mapped mmaped model as 1 overlapping shared buffers
ds4: Metal backend initialized for graph diagnostics
We need to explain Redis Streams in one paragraph. Keep it concise, covering key concepts: message queue, append-only log, consumer groups, persistence, etc.
Redis Streams is a data structure in Redis that functions as an append-only log, enabling reliable message streaming and event sourcing. It allows producers to add entries with unique IDs and field-value pairs, while consumer groups enable multiple consumers to collaboratively process messages with acknowledgment mechanisms, ensuring at-least-once delivery and fault tolerance. Streams support blocking reads, range queries, and trimming, making them ideal for building distributed message queues, real-time analytics, and event-driven architectures.
ds4: prefill: 30.91 t/s, generation: 31.69 t/s
If I run the server I get the below, but when I send a query nothing changes in the server window, and no response is received.
ds4 % ./ds4-server --ctx 81920 --kv-disk-dir /tmp/ds4-kv --kv-disk-space-mb 8192 --port 8072
ds4: requesting Metal residency (may take tens of seconds)... done
ds4: warming Metal model views... done
ds4: Metal model views created in 4.853 ms, residency requested in 1068.506 ms, warmup 6.194 ms (mapped 157001.67 MiB from offset 5.08 MiB)
ds4: Metal mapped mmaped model as 1 overlapping shared buffers
ds4: Metal backend initialized for graph diagnostics
0508 14:37:12 ds4-server: context buffers 2363.71 MiB (ctx=81920, backend=metal, prefill_chunk=2048, raw_kv_rows=2304, compressed_kv_rows=20482)
0508 14:37:12 ds4-server: KV disk cache /tmp/ds4-kv (budget=8192 MiB, cross-quant=accept, min=512, cold_max=30000, continued=10000, trim=32, align=2048)
0508 14:37:12 ds4-server: listening on http://127.0.0.1:8072
I've asked GLM about it, it suggests that the lack of CORs support in the ds4-server code might be the issue? I get a response when I use curl but not when I send the request via open webui.
Have got the model to respond using your llama cpp fork instead of ds4-server, so am using that for now, thanks for your work.