--- license: mit license_link: https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/LICENSE base_model: deepseek-ai/DeepSeek-V4-Pro base_model_relation: quantized library_name: transformers pipeline_tag: text-generation tags: - nvfp4 - ocp-mx - quantization - amd-quark - moe - deepseek language: - en - zh --- # DeepSeek-V4-Pro-NVFP4 ## Model Overview - **Model Architecture:** DeepseekV4ForCausalLM - **Input:** Text - **Output:** Text - **Supported Hardware Microarchitecture:** AMD MI355 / MI350 / MI300 (emulation) - **ROCm:** 7.2.3 - **PyTorch:** 2.11.0 - **Transformers:** 5.13.1 - **Operating System(s):** Linux - **Inference Engine:** [vLLM](https://docs.vllm.ai/en/latest/) / [SGLang](https://docs.sglang.ai/) - **Model Optimizer:** [AMD-Quark](https://quark.docs.amd.com/latest/index.html) (v0.12.0) - **Quantized layers:** - Router `experts`: NVFP4 - `shared_experts`, `attn`: FP8-E4M3 per-block ## Model Quantization The model was quantized from [deepseek-ai/DeepSeek-V4-Pro](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro) with `experts` quantized to MXFP4, and `shared_experts` and `attn` quantized to FP8. Using [AMD Quark](https://quark.docs.amd.com/latest/index.html), we re-quantized both `experts` and `shared_experts` to NVFP4 while keeping `attn` in FP8. ### Quantization script The end-to-end recipe lives in the Quark examples: `examples/torch/language_modeling/llm_ptq/deepseek_v4/nvfp4`, and is driven by `run_pipeline.sh`. The quantization scope is controlled by `EXCLUDE_LAYERS`. ```bash export EXCLUDE_LAYERS="*attn* *ffn.gate mtp* *shared_experts*" \ export SRC=deepseek-ai/DeepSeek-V4-Pro export OUT=amd/DeepSeek-V4-Pro-NVFP4 bash run_pipeline.sh ``` ## Deployment ### Use with vLLM This model can be deployed efficiently using the [vLLM](https://docs.vllm.ai/en/latest/) backend. [SGLang](https://docs.sglang.ai/) is also supported. ## Evaluation The model was evaluated on GSM8K benchmarks. ### Accuracy
| Benchmark | DeepSeek-V4-Pro (BF16) | DeepSeek-V4-Pro-NVFP4 | Recovery |
| GSM8K (flexible-extract) | 95.38 | 94.77 | 99.36% |