Downloads · 30 days
19
11% of all-time downloads
tachyphylaxis/DeepSeek-R1-0528-FP4
DeepSeek-R1-0528-FP4 is a text generation model from tachyphylaxis. Use it when you need the model to write or continue text. It is set up for Model Optimizer. The card lists the license as mit.
The NVIDIA DeepSeek-R1-0528-FP4 model is the quantized version of the DeepSeek AI's DeepSeek R1 0528 model, which is an auto-regressive language model that uses an optimized transformer architecture. For more informat…
Downloads · 30 days
19
11% of all-time downloads
All-time downloads
173
Public
Parameters
397B
586 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors424 GB · 100%
How the weights are stored.
U8329B · 83%
From the Hugging Face model README
The NVIDIA DeepSeek-R1-0528-FP4 model is the quantized version of the DeepSeek AI's DeepSeek R1 0528 model, which is an auto-regressive language model that uses an optimized transformer architecture. For more information, please check here. The NVIDIA DeepSeek R1 FP4 model is quantized with TensorRT Model Optimizer.
This model is ready for commercial/non-commercial use. <br>
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to Non-NVIDIA (DeepSeek R1) Model Card.
Architecture Type: Transformers <br> Network Architecture: DeepSeek R1 <br>
Input Type(s): Text <br> Input Format(s): String <br> Input Parameters: 1D (One Dimensional): Sequences <br> Other Properties Related to Input: DeepSeek recommends adhering to the following configurations when utilizing the DeepSeek-R1 series models, including benchmarking, to achieve the expected performance: \
Output Type(s): Text <br> Output Format: String <br> Output Parameters: 1D (One Dimensional): Sequences <br>
Supported Runtime Engine(s): <br>
Supported Hardware Microarchitecture Compatibility: <br>
Preferred Operating System(s): <br>
** The model is quantized with nvidia-modelopt v0.31.0 <br>
** Data Collection Method by dataset: Hybrid: Human, Automated <br> ** Labeling Method by dataset: Hybrid: Human, Automated <br>
** Data Collection Method by dataset: Hybrid: Human, Automated <br> ** Labeling Method by dataset: Hybrid: Human, Automated <br>
** Data Collection Method by dataset: Hybrid: Human, Automated <br> ** Labeling Method by dataset: Hybrid: Human, Automated <br>
Engine: TensorRT-LLM <br> Test Hardware: B200 <br>
This model was obtained by quantizing the weights and activations of DeepSeek R1 to FP4 data type, ready for inference with TensorRT-LLM. Only the weights and activations of the linear operators within transformer blocks are quantized. This optimization reduces the number of bits per parameter from 8 to 4, reducing the disk size and GPU memory requirements by approximately 1.6x.
To deploy the quantized FP4 checkpoint with TensorRT-LLM LLM API, follow the sample codes below (you need 8xB200 GPU and TensorRT LLM built from source with the latest main branch):
from tensorrt_llm import SamplingParams
from tensorrt_llm._torch import LLM
def main():
prompts = [
"Hello, my name is",
"The president of the United States is",
"The capital of France is",
"The future of AI is",
]
sampling_params = SamplingParams(max_tokens=32)
llm = LLM(model="nvidia/DeepSeek-R1-0528-FP4", tensor_parallel_size=8, enable_attention_dp=True)
outputs = llm.generate(prompts, sampling_params)
# Print the outputs.
for output in outputs:
prompt = output.prompt
generated_text = output.outputs[0].text
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
# The entry point of the program need to be protected for spawning processes.
if __name__ == '__main__':
main()
If you want to deploy your endpoint to minimize response latency for a single-concurrency or low-concurrency use case, follow the instructions below.
Step 1: Create configuration file (args.yaml)
moe_backend: TRTLLM
use_cuda_graph: true
speculative_config:
decoding_type: MTP
num_nextn_predict_layers: 3
use_relaxed_acceptance_for_thinking: true
relaxed_topk: 10
relaxed_delta: 0.6
Step 2: Start the TensorRT-LLM server
trtllm-serve nvidia/DeepSeek-R1-0528-FP4 \
--host 0.0.0.0 \
--port 8000 \
--backend pytorch \
--max_batch_size 4 \
--tp_size 8 \
--ep_size 2 \
--max_num_tokens 32768 \
--trust_remote_code \
--extra_llm_api_options args.yaml \
--kv_cache_free_gpu_memory_fraction 0.75
Step 3: Send an example query
curl localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "nvidia/DeepSeek-R1-0528-FP4",
"messages": [{"role": "user", "content": "Why is NVIDIA a great company?"}],
"max_tokens": 1024
}'
The accuracy benchmark results are presented in the table below:
<table> <tr> <td><strong>Precision</strong> </td> <td><strong>MMLU Pro</strong> </td> <td><strong>GPQA Diamond</strong> </td> <td><strong>LiveCodeBench</strong> </td> <td><strong>SCICODE</strong> </td> <td><strong>MATH-500</strong> </td> <td><strong>AIME 2024</strong> </td> </tr> <tr> <td>FP8 (AA Ref) </td> <td>85 </td> <td>81 </td> <td>77 </td> <td>40 </td> <td>98 </td> <td>89 </td> </tr> <tr> <td>FP4 </td> <td>84.2 </td> <td>80.0 </td> <td>76.3 </td> <td>40.1 </td> <td>98.1 </td> <td>91.3 </td> </tr> <tr> </table>The base model was trained on data that contains toxic language and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Please report security vulnerabilities or NVIDIA AI Concerns here.