Instructions to use intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound") model = AutoModelForCausalLM.from_pretrained("intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound
- SGLang
How to use intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound 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 "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound" \ --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": "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound", "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 "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound" \ --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": "intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound with Docker Model Runner:
docker model run hf.co/intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound
Model Details
This model is an MXFP4 (mixed MXFP4 experts / MXFP8 linear) model of deepseek-ai/DeepSeek-V4-Flash-0731 generated by intel/auto-round using RTN. Please follow the license of the original model.
- Quantized (MXFP4): routed experts
- Kept in BF16: router / embeddings / lm_head
How to Use
Environment
pip install vllm==0.29.0
uv pip install git+https://github.com/vllm-project/vllm.git@1b6e277ac010fb3361369162c42d39b06d612e24
vLLM Usage
vllm serve intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound
Evaluation
| Benchmark | BF16 | MXFP4 | Recovery |
|---|---|---|---|
| GSM8K | 95.83 | 95.68 | 99.84% |
| MMLU | 86.49 | 86.31 | 99.79% |
| PIQA | 83.41 | 82.32 | 98.69% |
| HellaSwag | 68.18 | 67.88 | 99.56% |
| Average | 83.48 | 83.05 | 99.48% |
Generate the Model
The original AutoRound version and source revision were not recorded for this checkpoint. The DeepSeek-V4 Flash/Pro generation PR is not evidence of this checkpoint's toolchain; obtain its exact build from the model maintainer for end-to-end regeneration.
auto-round \
--model_name deepseek-ai/DeepSeek-V4-Flash-0731 \
--model_free \
--scheme MXFP8 \
--ignore_layers "compressor,indexer.weights_proj" \
--layer_config "{ffn.experts:{bits:4,data_type:mx_fp}}" \
--format llm_compressor \
--output_dir DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound
Ethical Considerations and Limitations
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs. Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
The vLLM PR pinned above supports a BF16 fallback for the compressed-tensors output projection. The reported evaluation instead used an MXFP8 GEMM path whose exact build was not recorded; this installation must not be treated as that original evaluation environment.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Here are a couple of useful links to learn more about Intel's AI software:
Disclaimer
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
Cite
@article{cheng2023optimize,
title={Optimize weight rounding via signed gradient descent for the quantization of llms},
author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi},
journal={arXiv preprint arXiv:2309.05516},
year={2023}
}
Signed-off-by: Lv, Kaokao kaokao.lv@intel.com
- Downloads last month
- 1,070
Model tree for intel-ai/DeepSeek-V4-Flash-0731-MXFP4-Mixed-CT-AutoRound
Base model
deepseek-ai/DeepSeek-V4-Flash-0731