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
Upload folder using huggingface_hub
Browse files- config.json +3 -25
- generation_config.json +1 -1
- model-00001-of-00004.safetensors +2 -2
- model-00002-of-00004.safetensors +2 -2
- model-00003-of-00004.safetensors +2 -2
- model-00004-of-00004.safetensors +2 -2
- model.safetensors.index.json +2 -2
- tokenizer_config.json +1 -1
config.json
CHANGED
|
@@ -118,7 +118,7 @@
|
|
| 118 |
},
|
| 119 |
"output_activations": null,
|
| 120 |
"targets": [
|
| 121 |
-
"re:.*attn.*(
|
| 122 |
],
|
| 123 |
"weights": {
|
| 124 |
"actorder": null,
|
|
@@ -176,30 +176,7 @@
|
|
| 176 |
},
|
| 177 |
"format": "mixed-precision",
|
| 178 |
"global_compression_ratio": null,
|
| 179 |
-
"ignore": [
|
| 180 |
-
"layers.2.attn.indexer.weights_proj",
|
| 181 |
-
"layers.4.attn.indexer.weights_proj",
|
| 182 |
-
"layers.6.attn.indexer.weights_proj",
|
| 183 |
-
"layers.8.attn.indexer.weights_proj",
|
| 184 |
-
"layers.10.attn.indexer.weights_proj",
|
| 185 |
-
"layers.12.attn.indexer.weights_proj",
|
| 186 |
-
"layers.14.attn.indexer.weights_proj",
|
| 187 |
-
"layers.16.attn.indexer.weights_proj",
|
| 188 |
-
"layers.18.attn.indexer.weights_proj",
|
| 189 |
-
"layers.20.attn.indexer.weights_proj",
|
| 190 |
-
"layers.22.attn.indexer.weights_proj",
|
| 191 |
-
"layers.24.attn.indexer.weights_proj",
|
| 192 |
-
"layers.26.attn.indexer.weights_proj",
|
| 193 |
-
"layers.28.attn.indexer.weights_proj",
|
| 194 |
-
"layers.30.attn.indexer.weights_proj",
|
| 195 |
-
"layers.32.attn.indexer.weights_proj",
|
| 196 |
-
"layers.34.attn.indexer.weights_proj",
|
| 197 |
-
"layers.36.attn.indexer.weights_proj",
|
| 198 |
-
"layers.38.attn.indexer.weights_proj",
|
| 199 |
-
"layers.40.attn.indexer.weights_proj",
|
| 200 |
-
"layers.42.attn.indexer.weights_proj",
|
| 201 |
-
"lm_head"
|
| 202 |
-
],
|
| 203 |
"kv_cache_scheme": null,
|
| 204 |
"quant_method": "compressed-tensors",
|
| 205 |
"quantization_status": "compressed",
|
|
@@ -234,3 +211,4 @@
|
|
| 234 |
"v_head_dim": null,
|
| 235 |
"vocab_size": 129280
|
| 236 |
}
|
|
|
|
|
|
| 118 |
},
|
| 119 |
"output_activations": null,
|
| 120 |
"targets": [
|
| 121 |
+
"re:.*attn.*(fused_wqa_wkv|wq_b|wo_a|wo_b)$"
|
| 122 |
],
|
| 123 |
"weights": {
|
| 124 |
"actorder": null,
|
|
|
|
| 176 |
},
|
| 177 |
"format": "mixed-precision",
|
| 178 |
"global_compression_ratio": null,
|
| 179 |
+
"ignore": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
"kv_cache_scheme": null,
|
| 181 |
"quant_method": "compressed-tensors",
|
| 182 |
"quantization_status": "compressed",
|
|
|
|
| 211 |
"v_head_dim": null,
|
| 212 |
"vocab_size": 129280
|
| 213 |
}
|
| 214 |
+
|
generation_config.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
| 5 |
"eos_token_id": 1,
|
| 6 |
"temperature": 1.0,
|
| 7 |
"top_p": 1.0,
|
| 8 |
-
"transformers_version": "5.
|
| 9 |
}
|
|
|
|
| 5 |
"eos_token_id": 1,
|
| 6 |
"temperature": 1.0,
|
| 7 |
"top_p": 1.0,
|
| 8 |
+
"transformers_version": "5.8.0.dev0"
|
| 9 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee89b216becf894d7e1b70e5f24c1a075745659780f16baf3106ba7946d58792
|
| 3 |
+
size 50001268714
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:137eb45600eaad7925aeee49b3d993cfbcdc0d14bc391c0c710bb1bcbf3ba1d8
|
| 3 |
+
size 50001796128
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c7e600665a9f9942499f34384d7e7b3423fa60cba1594e2ad7aa20032364460
|
| 3 |
+
size 50001411336
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df4089b6034d2cbe3202855b633d6b6a927190f55f4bafe6b65e1b2b8d2b6a7b
|
| 3 |
+
size 14207891688
|
model.safetensors.index.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:125acfc024138d7fe7102fece5c3d609b015f2a3fed659f62164d6eb17ed60ba
|
| 3 |
+
size 11744849
|
tokenizer_config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "<|end▁of▁sentence|>",
|
| 6 |
-
"is_local":
|
| 7 |
"legacy": true,
|
| 8 |
"local_files_only": false,
|
| 9 |
"model_max_length": 1048576,
|
|
|
|
| 3 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "<|end▁of▁sentence|>",
|
| 6 |
+
"is_local": false,
|
| 7 |
"legacy": true,
|
| 8 |
"local_files_only": false,
|
| 9 |
"model_max_length": 1048576,
|