---
pipeline_tag: text-generation
base_model:
- deepseek-ai/DeepSeek-V4-Flash
- deepseek-ai/DeepSeek-V4-Flash-DSpark
license: mit
library_name: Model Optimizer
tags:
- nvidia
- ModelOpt
- DeepSeekV4
- quantized
- NVFP4
- nvfp4
- speculative-decoding
- DSpark
---
# Model Overview
## Description:
The NVIDIA DeepSeek-V4-Flash-nvfp4-DSpark model is a quantized version of DeepSeek AI's DeepSeek-V4-Flash model, an autoregressive Mixture-of-Experts language model that uses an optimized Transformer architecture with hybrid attention (Compressed Sparse Attention and Heavily Compressed Attention) and Manifold-Constrained Hyper-Connections, packaged in a **single checkpoint together with DeepSeek's official DSpark speculative decoding module**. For more information, refer to the [DeepSeek-V4-Flash model card](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash) and the [DeepSeek-V4-Flash-DSpark model card](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-DSpark). The NVIDIA DeepSeek-V4-Flash-nvfp4-DSpark model is quantized with [Model Optimizer](https://github.com/NVIDIA/Model-Optimizer).
**Note: DeepSeek-V4-Flash-nvfp4-DSpark is not a new model.** It is the NVFP4 backbone of [nvidia/DeepSeek-V4-Flash-NVFP4](https://huggingface.co/nvidia/DeepSeek-V4-Flash-NVFP4) with DeepSeek's official DSpark speculative decoding module attached, so a single checkpoint serves as both target and draft model. For more details on DSpark, refer to: https://github.com/deepseek-ai/DeepSpec
This model is ready for commercial/non-commercial use.
## Third-Party Community Consideration
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to Non-NVIDIA [(DeepSeek-V4-Flash-DSpark) Model Card](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-DSpark).
## References
- Nvidia Model Optimizer: [https://github.com/NVIDIA/Model-Optimizer](https://github.com/NVIDIA/Model-Optimizer)
- [DeepSeek-V4-Flash base model card](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash)
- [DeepSeek-V4-Flash-DSpark model card](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-DSpark)
- [nvidia/DeepSeek-V4-Flash-NVFP4 model card](https://huggingface.co/nvidia/DeepSeek-V4-Flash-NVFP4)
- [DeepSeek-V4 technical report](https://arxiv.org/abs/2606.19348)
- DeepSeek DSpec reference implementation: [https://github.com/deepseek-ai/DeepSpec](https://github.com/deepseek-ai/DeepSpec)
### License/Terms of Use:
[MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash/blob/main/LICENSE)
### Deployment Geography:
Global
### Use Case:
DeepSeek V4 is well-suited for advanced reasoning, agentic AI applications, tool use scenarios, and complex problem-solving in domains such as mathematics, software engineering, and enterprise AI assistants.
### Release Date:
Hugging Face 07/22/2026 via https://huggingface.co/nvidia/DeepSeek-V4-Flash-nvfp4-DSpark
## Model Architecture:
**Architecture Type:** Transformers
**Network Architecture:** Mixture-of-Experts (MoE) with Hybrid Attention (Compressed Sparse Attention + Heavily Compressed Attention)
**Number of Model Parameters:** 284B in total and 13B activated
**Number of Draft Model Parameters:** 21B in total and approximately 1B activated
**Draft Model Architecture:** DSpark — a 3-layer semi-autoregressive draft head (`mtp.0/1/2`), each layer combining MLA attention with a 256-expert MoE FFN (6 experts activated), fed by a projection over the hidden states of target layers 40/41/42, plus a rank-256 Markov head and a confidence head. Draft block size 5.
## Input:
**Input Type(s):** Text
**Input Format(s):** String
**Input Parameters:** 1D (One-Dimensional): Sequences
**Other Properties Related to Input:** Supports multi-turn conversations with system prompts, user messages, and assistant responses. Maximum context length of 1 million tokens. Uses a custom encoding pipeline (encoding_dsv4) with three reasoning modes: Non-think (fast), Think High (logical analysis), and Think Max (full reasoning extent).
## Output:
**Output Type(s):** Text
**Output Format:** String
**Output Parameters:** One-Dimensional (1D): Sequences
**Other Properties Related to Output:** Supports structured JSON output, function/tool calling, and reasoning content when enabled.
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA’s hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions.
## Software Integration:
**Supported Runtime Engine(s):**
* vLLM (with DSpark speculative decoding, `method: dspark`)
**Supported Hardware Microarchitecture Compatibility:**
* NVIDIA Blackwell
**Preferred Operating System(s):**
* Linux
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
## Model Version(s):
The model is DeepSeek-V4-Flash NVFP4 quantized with nvidia-modelopt **v0.44.0**, merged with the DSpark draft head released in [deepseek-ai/DeepSeek-V4-Flash-DSpark](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-DSpark).
## Training and Evaluation Datasets:
## Calibration Dataset:
**Link:** [cnn_dailymail](https://huggingface.co/datasets/abisee/cnn_dailymail), [Nemotron-Post-Training-Dataset-v2](https://huggingface.co/datasets/nvidia/Nemotron-Post-Training-Dataset-v2)
**Data Collection Method by dataset:** Automated.
**Labeling Method by dataset:** Automated.
**Properties:** The cnn_dailymail dataset is an English-language dataset containing just over 300k unique news articles as written by journalists at CNN and the Daily Mail. The Nemotron-Post-Training-Dataset-v2 is a post-training dataset curated by NVIDIA containing multi-turn conversations across diverse topics.
## Training Datasets:
**Data Modality:** Undisclosed
**Data Collection Method by dataset:** Undisclosed
**Labeling Method by dataset:** Undisclosed
**Data Size :** Undisclosed
**Properties:** Undisclosed
## Evaluation Dataset:
**Datasets:** GPQA Diamond, AA-LCR, τ²-Bench Telecom, SciCode, IFBench; [MT-Bench](https://github.com/lm-sys/FastChat/tree/main/fastchat/llm_judge); [SPEED-Bench](https://huggingface.co/datasets/nvidia/SPEED-Bench)
**Data Collection Method by dataset: Hybrid:** Automated, Human
**Labeling Method by dataset:** Hybrid: Human, Automated
**DataSet Properties:** Model accuracy was evaluated on reasoning, long-context recall, agentic tool-use, coding, and instruction-following benchmarks: GPQA Diamond contains 448 graduate-level multiple-choice questions written by domain experts in biology, physics, and chemistry; AA-LCR (Artificial Analysis Long Context Recall) evaluates a model's ability to accurately retrieve and recall information from long input contexts; τ²-Bench Telecom evaluates agentic tool-use and policy-adherence capabilities in dual-control telecom customer-service scenarios where the model interacts with a simulated user and external tools to resolve account issues; SciCode evaluates scientific coding capabilities; IFBench is a benchmark for evaluating instruction-following capabilities across diverse and structured task constraints. Speculative decoding acceptance was evaluated on MT-Bench, which contains 3,300 multi-turn dialogue sequences each annotated with expert preference votes, and on SPEED-Bench, a unified and diverse benchmark for speculative decoding spanning coding, humanities, math, multilingual, QA, RAG, reasoning, roleplay, STEM, summarization, and writing domains.
## Inference:
**Acceleration Engine:** vLLM
**Test Hardware:** NVIDIA Blackwell B300
## DSpark Speculative Decoding
This model is ready for inference with vLLM in DSpark speculative decoding mode, where a semi-autoregressive draft backbone proposes a block of candidate tokens, a lightweight Markov head injects intra-block token dependency, and a confidence head predicts per-position acceptance probability for scheduled verification. Compared with a purely parallel drafter, DSpark is designed to improve accepted length while preserving the latency benefits of block drafting. The longest accepted candidate sequence is selected so that more than one token is returned per generation step; the average number of tokens returned per step is reported below as the acceptance length (also referred to as acceptance rate).
The DSpark draft head in this checkpoint is the one released by DeepSeek in [deepseek-ai/DeepSeek-V4-Flash-DSpark](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-DSpark); it was not trained by NVIDIA and no additional draft training or distillation was performed. NVIDIA's contribution is the quantization and packaging described below.
## Post Training Quantization
This model was obtained by quantizing the weights and activations of DeepSeek-V4-Flash to NVFP4 data type, ready for inference with vLLM. Only the weights and activations of the linear operators within transformer blocks in MoE are quantized. The routed experts of the DSpark draft head are natively MXFP4 in the official release and were losslessly cast to NVFP4 (bit-exact), so that the target and the draft model share one self-consistent quantization config in a single checkpoint.
## Usage
### Deploy with vLLM
DSpark speculative decoding is enabled with a single flag — add `--speculative-config` with `method: dspark` to your vLLM launch command:
`--speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'`
Verified serving this checkpoint on **B300** with `vllm/vllm-openai:nightly` (vLLM 0.23.1rc1.dev1261) on a single 8-GPU node, tensor-parallel 8 with expert parallelism:
```sh
vllm serve nvidia/DeepSeek-V4-Flash-nvfp4-DSpark \
--tensor-parallel-size 8 --enable-expert-parallel \
--trust-remote-code --kv-cache-dtype fp8 \
--speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'
```
Alternatively, with the Python `LLM` API:
```python
from vllm import LLM, SamplingParams
llm = LLM(
model="nvidia/DeepSeek-V4-Flash-nvfp4-DSpark",
tensor_parallel_size=8,
enable_expert_parallel=True,
trust_remote_code=True,
kv_cache_dtype="fp8",
speculative_config={
"method": "dspark",
"num_speculative_tokens": 7,
"draft_sample_method": "greedy",
},
)
```
Note that no `"model"` entry is needed inside `speculative_config` — the draft head lives in the same checkpoint as the target.
Notes:
- `--kv-cache-dtype fp8` is required — DeepSeek-V4 uses the `fp8_ds_mla` KV cache layout.
- `num_speculative_tokens` must be at least `dspark_block_size` (5); the value of 7 used here follows DeepSeek's official recommendation for DeepSeek-V4-Flash-DSpark.
- No engine patches are needed. Because the target and the draft head live in one checkpoint with one quantization config, this avoids the mismatch that occurs when a quantized target is paired with a separately-loaded draft model directory.
- DeepSeek-V4 ships no Jinja chat template (it uses `encoding/encoding_dsv4.py`). A `chat_template.jinja` for chat / non-thinking mode is included in this repository, validated character-exact against the official encoder.
- See the [vLLM recipe](https://recipes.vllm.ai/deepseek-ai/DeepSeek-V4-Flash?hardware=b300&features=tool_calling,reasoning) for other hardware configurations and additional serving flags.
## Evaluation
The backbone weights of this checkpoint are identical to those of [nvidia/DeepSeek-V4-Flash-NVFP4](https://huggingface.co/nvidia/DeepSeek-V4-Flash-NVFP4); speculative decoding is verified against the target model and does not change its outputs. The accuracy benchmark results are presented in the table below:
| Precision | GPQA Diamond | AA-LCR | τ²-Bench Telecom | SciCode | IFBench |
| Baseline (ours) | 0.894 | 0.658 | 0.943 | 0.481 | 0.788 |
| NVFP4 | 0.891 | 0.655 | 0.942 | 0.481 | 0.795 |