1. Model Introduction
DeepSeek V3 is a large-scale Mixture-of-Experts (MoE) language model developed by DeepSeek, designed to deliver strong general-purpose reasoning, coding, and tool-augmented capabilities with high training and inference efficiency. As the latest generation in the DeepSeek model family, DeepSeek V3 introduces systematic architectural and training innovations that significantly improve performance across reasoning, mathematics, coding, and long-context understanding, while maintaining a competitive compute cost. Key highlights include:- Efficient MoE architecture: DeepSeek V3 adopts a fine-grained Mixture-of-Experts design with a large number of experts and sparse activation, enabling high model capacity while keeping inference and training costs manageable.
- Advanced reasoning and coding: The model demonstrates strong performance on mathematical reasoning, logical inference, and real-world coding benchmarks, benefiting from improved data curation and training strategies.
- Long-context capability: DeepSeek V3 supports extended context lengths, allowing it to handle long documents, complex multi-step reasoning, and agent-style workflows more effectively.
- Tool use and function calling: The model is trained to support structured outputs and tool invocation, enabling seamless integration with external tools and agent frameworks during inference.
2. SGLang Installation
SGLang offers multiple installation methods. You can choose the most suitable installation method based on your hardware platform and requirements. Please refer to the official SGLang installation guide for installation instructions. For SGLang CPU installation, please refer to the CPU version installation guide.3. Model Deployment
This section provides a progressive guide from quick deployment to performance optimization, suitable for users at different levels.3.1 Basic Configuration
Interactive Command Generator: Use the configuration selector below to automatically generate the appropriate deployment command for your hardware platform, model variant, deployment strategy, and thinking capabilities.3.2 Configuration Tips
Recommended GPU configurations by weight type:| Weight Type | Supported Hardware |
|---|---|
| FP8 (recommended) | 8× H200, 8× B200, 8× MI300X, 2×8× H100/H800/H20 |
| BF16 (upcast from FP8) | 2×8× H200, 2×8× MI300X, 4×8× H100/H800, 4×8× A100/A800 |
| INT8 | 16× A100/A800, 32× L40S, Xeon 6980P CPU, 4× Atlas 800I A3 |
| W4A8 / AWQ / MXFP4 / NVFP4 | 8× H20/H100, 4× H200; 8× H100/A100; 8/4× MI355X/MI350X; 8/4× B200 |
The official DeepSeek-V3 checkpoint is already in FP8 format — do not add --quantization fp8 when serving it.
DeepGEMM precompilation (NVIDIA Hopper / Blackwell): Precompile GEMM kernels before the first server run to avoid JIT overhead (~10 min):
SGLANG_ENABLE_JIT_DEEPGEMM=0.
Data Parallelism Attention (--enable-dp-attention): Recommended for high-throughput scenarios with large batch sizes. Reduces KV-cache duplication across TP ranks. Use --enable-dp-attention --tp 8 --dp 8 on a single 8-GPU node. Not recommended for low-latency, small-batch workloads.
NCCL timeout: If model loading is slow and you hit an NCCL timeout, increase it: --dist-timeout 3600.
Xeon CPU service configuration: Please refer to the Notes part in the serving engine launching section in the SGLang CPU server document to better understand how to configure the arguments, especially for TP (tensor parallel) and NUMA binding settings.
4. Model Invocation
4.1 Basic Usage
For basic API usage and request examples, please refer to:4.2 Advanced Usage
4.2.1 Reasoning Parser
DeepSeek-V3 supports reasoning mode. Enable the reasoning parser during deployment to separate the thinking and content sections:Command
Example
Output
4.2.2 Tool Calling
DeepSeek-V3 supports tool calling capabilities. Enable the tool call parser: Deployment Command:Command
Command
Use a low
temperature (e.g. 0) for more consistent tool call results. The --chat-template flag above provides an improved unified prompt for tool use.Example
Output
- The reasoning parser shows how the model decides to use a tool
- Tool calls are clearly marked with the function name and arguments
- You can then execute the function and send the result back to continue the conversation
Example
4.2.3 Multi-Token Prediction (EAGLE Speculative Decoding)
SGLang implements DeepSeek V3 Multi-Token Prediction (MTP) based on EAGLE speculative decoding. With this optimization, decoding speed improves by up to 1.8× at batch size 1 and 1.5× at batch size 32 on H200 TP8. Enable with:Command
--speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4. Find the best values for your workload with bench_speculative.py. The minimum viable config is --speculative-num-steps 1 --speculative-eagle-topk 1 --speculative-num-draft-tokens 2.
For large batch sizes (>48), increase
--max-running-requests beyond the default of 48 for MTP. Also set --cuda-graph-bs to include your target batch sizes (default captured sizes for speculative decoding: 48).4.2.4 MLA Optimizations
DeepSeek V3 uses Multi-head Latent Attention (MLA), an attention mechanism that improves inference efficiency. SGLang implements several optimizations:- Weight Absorption: Reorders matrix multiplications to improve decoding phase efficiency.
- MLA Attention Backends: FA3, Flashinfer, FlashMLA, CutlassMLA, TRTLLM MLA (Blackwell), and Triton. FA3 is the default.
- FP8 Quantization: W8A8 FP8 and KV Cache FP8, with BMM operators for weight-absorbed MLA in FP8.
- CUDA Graph & Torch.compile: Both MLA and MoE support CUDA Graph and Torch.compile for reduced decoding latency.
- Chunked Prefix Cache: Increases throughput for long-sequence chunked prefill (FlashAttention3 backend only).
4.2.5 Multi-Node Deployment
For multi-node serving and hardware-specific examples:- 8× H200 / 4–8× B200
- 8× MI300X
- 2×8× H200 with Docker
- 4×8× A100
- 8× A100 AWQ
- 16× A100 INT8
- 32× L40S INT8
- Xeon 6980P CPU
- 4× Atlas 800I A3 (int8)
- Deploying DeepSeek on GB200 NVL72 with PD and Large Scale EP (Part I, Part II)
- PD Disaggregation and Large-Scale Expert Parallelism on 96× H100
- Best Practices for Serving DeepSeek-R1 on H20
5. Benchmark
5.1 Speed Benchmark
Test Environment:- Hardware: AMD MI300X GPU (8x)
- Model: DeepSeek-V3
- Tensor Parallelism: 8
- sglang version: 0.5.7
5.1.1 Latency-Sensitive Benchmark
- Model Deployment Command:
Command
- Benchmark Command:
Command
- Test Results:
Output
5.1.2 Throughput-Sensitive Benchmark
- Model Deployment Command:
Command
- Benchmark Command:
Command
- Test Results:
Output
5.2 Accuracy Benchmark
5.2.1 GSM8K Benchmark
- Benchmark Command:
Command
- Test Results:
- DeepSeek-V3
Output
- DeepSeek-V3
5.2.2 MMLU Benchmark
- Benchmark Command:
Command
- Test Results:
- DeepSeek-V3
Output
- DeepSeek-V3
