Instructions to use RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8") model = AutoModelForCausalLM.from_pretrained("RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8
- SGLang
How to use RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 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 "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8" \ --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": "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8", "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 "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8" \ --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": "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 with Docker Model Runner:
docker model run hf.co/RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8
Update README.md
Browse files
README.md
CHANGED
|
@@ -24,6 +24,9 @@ vllm serve RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8 --tensor-parallel-size 4 --port
|
|
| 24 |
```
|
| 25 |
|
| 26 |
## Evaluation
|
|
|
|
|
|
|
|
|
|
| 27 |
```bash
|
| 28 |
python tests/evals/gsm8k/gsm8k_eval.py
|
| 29 |
```
|
|
@@ -38,4 +41,19 @@ Total output tokens: 116217
|
|
| 38 |
Output tokens per second: 671.752
|
| 39 |
```
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
For more details on how this model was created and run in LLM Compressor, please contact Kyle Sayers on the vLLM Slack: https://communityinviter.com/apps/vllm-dev/join-vllm-developers-slack
|
|
|
|
| 24 |
```
|
| 25 |
|
| 26 |
## Evaluation
|
| 27 |
+
This model has a noticably lower accuracy recovery than the base model due to the base model being released in a quantized format and differences between mxfp4 and nvfp4.
|
| 28 |
+
More advanced techniques such as GPTQ can be used to increase accuracy recovery beyond this model's current state.
|
| 29 |
+
|
| 30 |
```bash
|
| 31 |
python tests/evals/gsm8k/gsm8k_eval.py
|
| 32 |
```
|
|
|
|
| 41 |
Output tokens per second: 671.752
|
| 42 |
```
|
| 43 |
|
| 44 |
+
```bash
|
| 45 |
+
python3 tests/evals/mmlu_pro/mmlu_pro_eval.py --port 8089
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
```
|
| 49 |
+
Results:
|
| 50 |
+
Category: all
|
| 51 |
+
Accuracy: 0.554
|
| 52 |
+
Invalid responses: 0.000
|
| 53 |
+
Total latency: 112.065 s
|
| 54 |
+
Questions per second: 107.366
|
| 55 |
+
Total output tokens: 24076
|
| 56 |
+
Output tokens per second: 214.840
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
For more details on how this model was created and run in LLM Compressor, please contact Kyle Sayers on the vLLM Slack: https://communityinviter.com/apps/vllm-dev/join-vllm-developers-slack
|