AtlasCloud/DeepSeek-V4-Flash-Vision-Exp-FP8-DSpark
DeepSeek-V4-Flash-Vision-Exp FP8 (DSpark)
Lossless conversion of official `deepseek-ai/DeepSeek-V4-Flash-Vision-Exp` FP4 routed-expert weights to FP8 e4m3 + 128×128 ue8m0. Dense layers, shared experts, tokenizer, and DSpark / vision configs are unchanged.
This repo is a drop-in Hugging Face checkpoint: after hf download, you can point SGLang (or the bundled reference inference/) at the local folder. No extra conversion step.
config.json:expert_dtype=fp8,quantization_config.quant_method=fp8- 48
model-*-of-00048.safetensorsshards +model.safetensors.index.json tokenizer.json/tokenizer_config.json/generation_config.json
Download
hf download AtlasCloud/DeepSeek-V4-Flash-Vision-Exp-FP8-DSpark --local-dir /path/to/DeepSeek-V4-Flash-Vision-Exp-FP8SGLang
Routed experts are already FP8, so disable the FP4-expert path:
export SGLANG_DSV4_FP4_EXPERTS=0
python -m sglang.launch_server \
--model-path /path/to/DeepSeek-V4-Flash-Vision-Exp-FP8 \
--trust-remote-codeAdd your usual TP/DP/EP, multimodal, and DSpark serving flags.
Conversion
Expert tensors were recast with the official lossless e2m1fn → e4m3fn mapping (same as DeepSeek's inference/convert.py --expert-dtype fp8). Original FP4 checkpoint: deepseek-ai/DeepSeek-V4-Flash-Vision-Exp.
DeepSeek-V4-Flash-Vision-Exp
<!-- markdownlint-disable first-line-h1 --> <!-- markdownlint-disable html --> <!-- markdownlint-disable no-duplicate-header -->
<div align="center"> <img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek-V4" /> </div> <hr> <div align="center" style="line-height: 1;"> <a href="https://www.deepseek.com/" target="blank" style="margin: 2px;"> <img alt="Homepage" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/> </a> <a href="https://chat.deepseek.com/" target="blank" style="margin: 2px;"> <img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V4-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/> </a> </div> <div align="center" style="line-height: 1;"> <a href="https://huggingface.co/deepseek-ai" target="blank" style="margin: 2px;"> <img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/> </a> <a href="https://twitter.com/deepseekai" target="blank" style="margin: 2px;"> <img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-deepseekai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/> </a> </div> <div align="center" style="line-height: 1;"> <a href="LICENSE" style="margin: 2px;"> <img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/> </a> </div>
Introduction
We are excited to introduce DeepSeek-V4-Flash-Vision-Exp, our first experimental multimodal model in the DeepSeek-V4 family. It builds on the DeepSeek-V4-Flash architecture by incorporating visual modules and undergoing continued training to unlock visual understanding capabilities.
Compared to DeepSeek-V4-Flash-0731, DeepSeek-V4-Flash-Vision-Exp achieves substantial improvements on its multimodal agent capabilities, while maintaining comparable performance on text-only agent tasks.
<div align="center">
</div>
Notes:
- For the text agent benchmarks above, DeepSeek models are evaluated with the minimal mode of DeepSeek Harness as the agent framework, using the
maxreasoning effort level withtemperature = 1.0, top_p = 0.95. - † For ApexBench and Agents' Last Exam, DeepSeek-V4-Flash-0731 ignores the multimodal elements in the input.
Repository layout
This repository contains the tokenizer, prompt encoding reference, and a minimal PyTorch inference implementation for DeepSeek-V4 Flash Vision. The reference inference covers the vision encoder and aligner, DFlash attention, MoE, Hyper-Connections, and the DSpark forward path.
.
├── encoding/ # OpenAI-style messages -> model prompt
├── inference/ # weight conversion and minimal inference
│ └── examples/ # equivalent TXT and JSON vision prompts
├── config.json # Hugging Face model metadata
├── generation_config.json
├── model.safetensors.index.json
├── tokenizer.json
└── tokenizer_config.jsonencoding/ and inference/ deliberately remain separate: prompt formatting does not depend on PyTorch, while inference imports the sibling encoding module with an explicit Python path. No symlinks are required.
The tokenizer files are regular files so that the repository can be uploaded to Hugging Face without relying on local filesystem symlinks. The large model shards are described by model.safetensors.index.json and are not duplicated inside the source checkout used to assemble this repository.
Prompt encoding
See `encoding/README.md`. Both OpenAI-style JSON content blocks and the compact <image>path</image> TXT notation are supported. The two examples under inference/examples/ encode to identical prompts and token IDs.
Minimal inference
See `inference/README.md` for dependency installation, checkpoint conversion, and TXT/JSON inference commands.
License
This repository is licensed under the MIT License.
