Instructions to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated 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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M # Run inference directly in the terminal: llama cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M # Run inference directly in the terminal: llama cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M # Run inference directly in the terminal: ./llama-cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
Use Docker
docker model run hf.co/apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
- LM Studio
- Jan
- vLLM
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
- SGLang
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Ollama:
ollama run hf.co/apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
- Unsloth Desktop
- Pi
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
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": "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Docker Model Runner:
docker model run hf.co/apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
- Lemonade
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
Run and chat with the model
lemonade run user.DeepSeek-V4-Flash-Vision-Exp-Abliterated-IQ2_M
List all available models
lemonade list
- Hermes Agent
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M
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 "apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:IQ2_M" \ --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"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:# Run inference directly in the terminal:
llama cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated: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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:# Run inference directly in the terminal:
./llama-cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated: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 apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:# Run inference directly in the terminal:
./build/bin/llama-cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:Use Docker
docker model run hf.co/apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:DeepSeek-V4-Flash-Vision-Exp Abliterated
Experimental research release. Text and focused image smoke tests pass, but broader quality, safety, and production-runtime evaluation remains pending.
This catalog contains the native abliterated checkpoint and two DS4 GGUF
profiles. Both GGUF receivers use tensor types accepted by antirez/ds4 main;
neither requires the legacy Python vision sidecar for current native vision.
| Profile | Receiver | Intended use |
|---|---|---|
Reference-Native-GGUF |
155,976,505,536 bytes | Higher-fidelity reference; requires SSD streaming on a 128 GiB Mac |
Basic128-Routed-IQ2_M |
102,826,285,248 bytes | Resident 128 GiB profile; fastest local option |
Basic128-Routed-IQ2_M uses the closest familiar BPW class for the complete
bundle: 2.915 BPW overall, close to llama.cpp's documented 2.9294 BPW for
IQ2_M. The routed-expert subset averages 2.715 BPW, close to IQ2_S. This is a
custom mixed recipe rather than llama.cpp's exact IQ2_M preset: routed gate/up
tensors use IQ2_XXS, routed down tensors use Q2_K, ten routed layers retain
MXFP4, and non-routed tensors include F32, F16, and Q8_0. See the
llama.cpp quantization table
for the reference BPW classes.
Runtime compatibility
The documented upstream baseline is antirez/ds4 main commit
110afdd8886586f18fc9b28bc5533152dd10e728.
| Runtime and mode | Reference | Basic128 |
|---|---|---|
Exact antirez/main, text |
SSD streaming: passes | Resident or SSD streaming: passes |
Exact antirez/main, native image |
SSD mapping bug | Resident: passes |
apetersson/ds4-flash-vision, text + image |
SSD streaming: passes | Resident or SSD streaming: passes |
Current upstream main has one Metal caveat: SSD prefill remaps receiver spans by
discarding the separately mapped vision encoder. The model is accepted and text
works, but native image prefill fails when --vision and --ssd-streaming are
combined. The isolated upstream-ready fix is
17799146 on branch
metal-vision-ssd-streaming-map; it is also included in ds4-flash-vision as
164bb227.
Portable setup
The commands below assume that the model repository and DS4 checkout are
sibling directories. If your layout differs, set MODEL_REPO to the
appropriate path relative to the DS4 checkout. No machine-specific paths are
required.
For the documented upstream baseline:
git clone https://github.com/antirez/ds4.git
cd ds4
git checkout 110afdd8886586f18fc9b28bc5533152dd10e728
make -j ds4-server
MODEL_REPO="../DeepSeek-V4-Flash-Vision-Exp-Abliterated"
For full reference-profile vision support and the additional server fixes:
git clone --branch ds4-flash-vision --single-branch \
https://github.com/apetersson/ds4.git ds4-flash-vision
cd ds4-flash-vision
make -j ds4-server
MODEL_REPO="../DeepSeek-V4-Flash-Vision-Exp-Abliterated"
Keep the selected checkout open for the launch commands that follow.
Reference profile
Text with the upstream baseline
The reference receiver does not fit in 128 GiB without SSD streaming. The upstream baseline command is therefore text-only because of the SSD/native- vision mapping issue described above:
./ds4-server \
--model "${MODEL_REPO}/Reference-Native-GGUF/DeepSeek-V4-Flash-Vision-Exp-Abliterated-Reference-MainCompat-F16-Q8-MXFP4.gguf" \
--metal \
--ctx 2048 \
--tokens 4000 \
--prefill-chunk 512 \
--ssd-streaming \
--ssd-streaming-cache-experts 48GB \
--host 127.0.0.1 \
--port 18080
Text and images with ds4-flash-vision
Use the ds4-flash-vision checkout for the complete reference path on a
128 GiB Mac:
./ds4-server \
--model "${MODEL_REPO}/Reference-Native-GGUF/DeepSeek-V4-Flash-Vision-Exp-Abliterated-Reference-MainCompat-F16-Q8-MXFP4.gguf" \
--vision "${MODEL_REPO}/Reference-Native-GGUF/mmproj-DeepSeek-V4-Flash-Vision-Exp-F16.gguf" \
--metal \
--ctx 2048 \
--tokens 4000 \
--prefill-chunk 512 \
--ssd-streaming \
--ssd-streaming-cache-experts 48GB \
--host 127.0.0.1 \
--port 18080
Validation at 164bb227 returned OK for the text smoke test and correctly
identified an Earth image. The server planned 52.39 GiB at --ctx 2048 with a
512-token prefill chunk. SSD-streamed decoding is expected to be slow because
uncached experts must be read from storage.
Basic128 resident profile
The 95.76 GiB receiver fits in memory on the tested 128 GiB M1 Ultra, avoids SSD expert misses, and supports native images with the upstream baseline:
./ds4-server \
--model "${MODEL_REPO}/Basic128-Routed-IQ2_M/DeepSeek-V4-Flash-Vision-Exp-Abliterated-Basic128-Routed-IQ2_M.gguf" \
--vision "${MODEL_REPO}/Basic128-Routed-IQ2_M/mmproj-DeepSeek-V4-Flash-Vision-Exp-F16.gguf" \
--metal \
--ctx 32000 \
--tokens 4000 \
--prefill-chunk 1024 \
--host 127.0.0.1 \
--port 18080
At 32K context, this configuration planned 96.17 GiB on the tested M1 Ultra.
Text generation reached about 23.4 tok/s, and the native image smoke test
correctly identified an Earth image. If Metal reports insufficient memory,
close other GPU-heavy applications, reduce --ctx, or reduce
--prefill-chunk.
The same command works with ds4-flash-vision, which additionally provides
conditional /v1/models image metadata, incremental tool-enabled answer
streaming, M1 prefill optimizations, and the vision/SSD mapping fix. The
Basic128 profile should normally remain resident; add the following options
only when memory is constrained:
--ssd-streaming --ssd-streaming-cache-experts 48GB
Sending an image
IMAGE_B64="$(base64 < image.png | tr -d '\n')"
curl http://127.0.0.1:18080/v1/chat/completions \
-H 'Content-Type: application/json' \
-d "{\"messages\":[{\"role\":\"user\",\"content\":[
{\"type\":\"text\",\"text\":\"Describe this image.\"},
{\"type\":\"image_url\",\"image_url\":{
\"url\":\"data:image/png;base64,$IMAGE_B64\"}}
]}],\"max_tokens\":128}"
Conversion and provenance
The reference receiver was minimally adapted for stock main rather than fully requantized: 129 routed-expert and 559 other compatible tensors were copied byte-for-byte, 338 F32 plain/control tensors became F16, and 345 F16 dense projections became Q8_0. The original incompatible 164.7 GB source-preserving receiver is no longer published in this catalog.
The Basic128 receiver similarly preserves every routed-expert payload from its source quant. Its expert layout is 66 IQ2_XXS gate/up tensors, 33 Q2_K down tensors, and 30 MXFP4 tensors. See each variant folder for checksums and its machine-readable build manifest.
This is a rank-1 abliterated derivative of
deepseek-ai/DeepSeek-V4-Flash-Vision-Exp.
It was produced by targeted projection edits, not gradient fine-tuning.
Hugging Face uses the finetune parent relation because it has no generic
model-surgery relation.
.
├── Reference-Native-FP8/ native mixed-precision checkpoint
├── Reference-Native-GGUF/ higher-fidelity main-compatible GGUF
├── Basic128-Routed-IQ2_M/ resident 128 GiB GGUF
├── README.md catalog and launch instructions
├── NOTICE source and direction provenance
└── variants.json machine-readable variant registry
- Downloads last month
- 1,867
2-bit
4-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated:# Run inference directly in the terminal: llama cli -hf apetersson/DeepSeek-V4-Flash-Vision-Exp-Abliterated: