Instructions to use INCModel/DeepSeek-V4-Pro-MXFP4-LLMC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INCModel/DeepSeek-V4-Pro-MXFP4-LLMC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="INCModel/DeepSeek-V4-Pro-MXFP4-LLMC", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("INCModel/DeepSeek-V4-Pro-MXFP4-LLMC") model = AutoModelForCausalLM.from_pretrained("INCModel/DeepSeek-V4-Pro-MXFP4-LLMC", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use INCModel/DeepSeek-V4-Pro-MXFP4-LLMC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/INCModel/DeepSeek-V4-Pro-MXFP4-LLMC
- SGLang
How to use INCModel/DeepSeek-V4-Pro-MXFP4-LLMC 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 "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC" \ --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": "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC", "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 "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC" \ --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": "INCModel/DeepSeek-V4-Pro-MXFP4-LLMC", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use INCModel/DeepSeek-V4-Pro-MXFP4-LLMC with Docker Model Runner:
docker model run hf.co/INCModel/DeepSeek-V4-Pro-MXFP4-LLMC
| license: mit | |
| library_name: transformers | |
| base_model: | |
| - deepseek-ai/DeepSeek-V4-Pro | |
| This model is a MXFP4 model of [deepseek-ai/DeepSeek-V4-Pro](https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro) generated by [intel/auto-round](https://github.com/intel/auto-round) with llm_compressor format. Please follow the license of the original model. | |
| | Model | niah_multiquery 1M | ruler_qa_squad 16K | ruler_qa_squad 1M | longbench_v2 | aime26 | gpqa_diamond | math_500 | mmlu | piqa | hellaswag | gsm8k | mmlu_pro | | |
| |----------------------------------------------------|--------------------|--------------------|-------------------|--------------|--------|--------------|----------|--------|--------|-----------|--------|----------| | |
| | DeepSeek-V4-Pro (W4A8 MXFP4 MoE, block FP8 Linear) | 1 | 0.7803 | 0.6927 | 0.6229 | 0.4837 | 0.7361 | 0.9416 | 0.9140 | 0.9348 | 0.8908 | 0.9644 | 0.8367 | | |
| | INCModel/DeepSeek-V4-Pro-MXFP4-Mixed-LLMC (W4A4 MXFP4 MoE, MXFP8 Linear) | 1 | 0.7805 | 0.6983 | 0.6229 | 0.4903 | 0.7364 | 0.9400 | 0.9125 | 0.9267 | 0.8882 | 0.9649 | 0.8354 | | |
| | **INCModel/DeepSeek-V4-Pro-MXFP4-LLMC (W4A4 MXFP4 MoE & Linear)** | 0.998 | 0.7577 | 0.6830 | 0.6076 | 0.4353 | 0.7125 | 0.9324 | 0.9074 | 0.9246 | 0.8844 | 0.9532 | 0.8295 | | |
| ## How to Run Locally | |
| **vLLM is supported here: https://github.com/vllm-project/vllm/pull/45645** | |
| ``` | |
| vllm serve INCModel/DeepSeek-V4-Pro-MXFP4-LLMC \ | |
| --trust-remote-code \ | |
| --kv-cache-dtype fp8 \ | |
| --block-size 256 \ | |
| --tensor-parallel-size 8 \ | |
| --attention_config.use_fp4_indexer_cache=True \ | |
| --port 8009 \ | |
| --no-enable-flashinfer-autotune \ | |
| --enforce-eager | |
| ```` | |
| ``` | |
| curl -s http://127.0.0.1:8009/v1/chat/completions -H "Content-Type: application/json" -d '{ | |
| "model": "DeepSeek-V4-Pro-MXFP4-LLMC", | |
| "messages": [ | |
| {"role":"user","content":"2+3=?"} | |
| ], | |
| "max_tokens": 10, | |
| "extra_body": { | |
| "chat_template_kwargs": { | |
| "enable_thinking": true | |
| } | |
| } | |
| }' | python3 -m json.tool | |
| ``` | |
| For local deployment, we recommend setting the sampling parameters to `temperature = 1.0, top_p = 1.0`. For the Think Max reasoning mode, we recommend setting the context window to at least **384K** tokens. | |
| ## Generate the Model | |
| Depends on this PR: https://github.com/intel/auto-round/pull/1921 | |
| ~~~bash | |
| auto-round deepseek-ai/DeepSeek-V4-Pro \ | |
| --model_free \ | |
| --scheme MXFP4 \ | |
| --ignore_layers compressor,indexer.weights_proj \ | |
| --format llm_compressor \ | |
| --output_dir "./DeepSeek-V4-Pro-MXFP4" | |
| ~~~ | |
| ## 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 | |
| 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: | |
| - [Intel Neural Compressor](https://github.com/intel/neural-compressor) | |
| ## 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} } | |
| [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round) | |