HuggingFace镜像/DeepSeek-V4-Flash-Vision-Exp
模型介绍
文件和版本
分析

DeepSeek-V4-Flash-Vision-Exp

DeepSeek-V4

Homepage Chat
Hugging Face Twitter Follow
License

简介

我们很高兴推出 DeepSeek-V4-Flash-Vision-Exp,这是 DeepSeek-V4 系列中首个实验性多模态模型。该模型基于 DeepSeek-V4-Flash 架构,通过引入视觉模块并进行继续训练,解锁视觉理解能力。

与 DeepSeek-V4-Flash-0731 相比,DeepSeek-V4-Flash-Vision-Exp 在多模态智能体能力上取得了显著提升,同时在纯文本智能体任务上保持相近性能。

基准测试DeepSeek-V4-Flash-Vision-ExpDeepSeek-V4-Flash-0731Opus-4.8
文本智能体能力
Terminal Bench 2.183.982.785.0
NL2Repo57.754.269.7
Cybergym75.376.778.3
DeepSWE59.354.458.0
Toolathlon-Verified75.970.376.2
DSBench-Hard63.659.671.7
AutomationBench (Public)25.725.127.2
多模态智能体能力
ApexBench (Pass@1)36.526.2†39.4
Agents' Last Exam27.325.2†25.7
Chartography64.3-65.0
ZeroBench (Pass@5)35.0-34.0

说明:

  1. 对于上述文本智能体基准测试,DeepSeek 模型以 DeepSeek Harness 的最小模式作为智能体框架进行评估,使用 max 推理力度,并设置 temperature = 1.0, top_p = 0.95。
  2. † 在 ApexBench 和 Agents' Last Exam 中,DeepSeek-V4-Flash-0731 会忽略输入中的多模态元素。

仓库结构

本仓库包含 DeepSeek-V4 Flash Vision 的分词器、提示编码参考实现,以及 一个最小化的 PyTorch 推理实现。参考推理覆盖视觉编码器与对齐器、DFlash 注意力、 MoE、Hyper-Connections 和 DSpark 前向路径。

.
├── 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.json

encoding/ 和 inference/ 刻意保持独立:提示词格式化不依赖 PyTorch,而 inference 通过显式 Python 路径导入同级的 encoding 模块。无需使用符号链接。

tokenizer 文件均为普通文件,因此将仓库上传至 Hugging Face 时,无需依赖本地文件系统中的符号链接。大型模型分片由 model.safetensors.index.json 描述,且在用于组装本仓库的源码检出中不会重复存放。

提示词编码

参见 encoding/README.md。同时支持 OpenAI 风格的 JSON 内容块以及紧凑的 <image>path</image> TXT 写法。inference/examples/ 下的两个示例编码后得到完全相同的提示词与 token ID。

最小化推理

依赖安装、checkpoint 转换以及 TXT/JSON 推理命令,请参见 inference/README.md。

如何使用 vLLM 运行

例如,下方命令会在单台 4×GB300 节点上使用 vLLM 提供模型服务。 详细步骤和其他硬件配置,请参见 vLLM 方案。

docker run --gpus all \
  vllm/vllm-openai:deepseekv4-flash-vision deepseek-ai/DeepSeek-V4-Flash-Vision-Exp \
  --kv-cache-dtype fp8 \
  --block-size 256 \
  --tensor-parallel-size 4 \
  --tool-call-parser deepseek_v4 \
  --enable-auto-tool-choice \
  --reasoning-parser deepseek_v4 \
  --reasoning-config '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}' \
  --speculative-config '{"method":"dspark","model":"deepseek-ai/DeepSeek-V4-Flash-Vision-Exp","num_speculative_tokens":3,"draft_sample_method":"probabilistic","enable_adaptive_verification":true}'

如何使用 SGLang 运行

使用 --speculative-algorithm DSPARK 启用 DSpark,并且不要单独设置 --speculative-draft-model-path,因为 target 和 draft 权重来自同一个 checkpoint。请参阅 SGLang cookbook 获取详细说明、基准测试和其他硬件配置。

sglang serve \
  --model-path deepseek-ai/DeepSeek-V4-Flash-Vision-Exp \
  --tp 4 \
  --speculative-algorithm DSPARK \
  --mem-fraction-static 0.85 \
  --host 0.0.0.0 \
  --port 30000

许可

本仓库依据 MIT License 授权。