Instructions to use apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8") model = AutoModelForCausalLM.from_pretrained("apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8 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-0731-Abliterated-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8
- SGLang
How to use apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8 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-0731-Abliterated-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-0731-Abliterated-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8 with Docker Model Runner:
docker model run hf.co/apetersson/DeepSeek-V4-Flash-0731-Abliterated-FP8
You're so quick! Thanks for your model!
You're so quick! Thanks for your model!
hybrid quantised Q2_Q3 imatrix -style variants of this targeting 128GB Ram (MLX) also coming, currently uploading, will take a few hours.
https://huggingface.co/apetersson/DeepSeek-V4-Flash-0731-Abliterated-MLX-Mixed-2bit-3bit-g64
and later variants with preserved DSpark abliterated/non-abliterated variants, both also targeting 128GB with up to 1M context (upload pending, ca 5 hours left)
when DS4 is updated for 0731 - GGUF variant quants might arrive too next week.
when DS4 is updated for 0731 - GGUF variant quants might arrive too next week.
Isn't the architecture / size 1:1 identical here?
when DS4 is updated for 0731 - GGUF variant quants might arrive too next week.
Isn't the architecture / size 1:1 identical here?
MLX → GGUF conversion would double-quantize. Correct GGUFs must be produced directly from the clean and abliterated 0731 FP8 checkpoints.
0731 prompt encoding changed. DS4 needs the 0731 reasoning-effort/tool formatting and release metadata, even though its core compute graph barely changes.
DSpark packaging differs. oMLX embeds the three DSpark stages; DS4 expects a separate support GGUF passed with --mtp ... --dspark.
new quant published targeting 128GB machines on the DS4 engine: https://huggingface.co/apetersson/DeepSeek-V4-Flash-0731-Abliterated-DS4-Headroom128
What about the vanilla llama.cpp?
What about the vanilla llama.cpp?
Well it is in gguf format which I think it should work with vanilla llama.cpp in theory, since DeepSeek V4 support was implemented a while ago and this update it's just technically post-training to my understanding. No changes in architecture as far as I know.
The quant is low precision. It would be really nice for the full precision gguf to be uploaded too for machines with more memory to retain as close to full capabilities as possible.
So, finally, I quantized the model myself with llama.cpp into the native precision 156 GB Q8/MXFP4 checkpoint using ggml-org/llama.cpp's convert_hf_to_gguf.py (with transformers updated to latest)
python convert_hf_to_gguf.py --outfile /media/kabachuha/doc/DeepSeek-V4-Flash-0731-Abliterated-FP8.gguf --outtype q8_0 --fp8-as-q8 /media/kabachuha/doc/DeepSeek-V4-Flash-0731-Abliterated-FP8
The abilterated model works fine, writes profanity and NSFW/NSFL (human centipede-style) in straight chat window w/o jailbreaks. Reasoning/multilingual doesn't seem to be broken.
The positivity bias is present, hopefully someone like https://huggingface.co/gghfez/DeepSeek-V4-Flash-control-vectors/ will update the control vector repository, so dark/nihilistic writing will be enhanced too.
@apetersson , thank you!