| `--disable-radix-cache` |
Disable RadixAttention for prefix caching. |
`False` |
bool flag (set to enable) |
| `--cuda-graph-config` |
Canonical per-phase CUDA graph settings as JSON, e.g. `{"decode":{"backend":"full","max_bs":256},"prefill":{"backend":"breakable"}}`. JSON wins over the per-phase `--cuda-graph-*` convenience flags and over the legacy flags. Allowed backends: `full`, `breakable`, `disabled`. |
`None` |
Type: JSON (dict-of-dicts) |
| `--cuda-graph-backend-decode` |
Backend for the decode phase. Folds into `cuda_graph_config[decode].backend`. |
`None` |
`full`, `breakable`, `disabled` |
| `--cuda-graph-backend-prefill` |
Backend for the prefill phase. Folds into `cuda_graph_config[prefill].backend`. |
`None` |
`breakable`, `disabled` |
| `--cuda-graph-max-bs-decode` |
Maximum batch size captured for the decode CUDA graph. |
`None` |
Type: int |
| `--cuda-graph-max-bs-prefill` |
Maximum batch size captured for the prefill CUDA graph. |
`None` |
Type: int |
| `--cuda-graph-max-seq-len-prefill` |
Longest sequence a prefill CUDA graph replay admits; longer batches run eager prefill. Folds into `cuda_graph_config[prefill].max_seq_len`. |
`None` |
Type: int |
| `--cuda-graph-bs-decode` |
Explicit list of batch sizes to capture for the decode CUDA graph. |
`None` |
List\[int] |
| `--cuda-graph-bs-prefill` |
Explicit list of batch sizes to capture for the prefill CUDA graph. |
`None` |
List\[int] |
| `--disable-cuda-graph-padding` |
Disable cuda graph when padding is needed. Still uses cuda graph when padding is not needed. |
`False` |
bool flag (set to enable) |
| `--enable-profile-cuda-graph` |
Enable profiling of cuda graph capture. |
`False` |
bool flag (set to enable) |
| `--debug-cuda-graph` |
Eager-mode CUDA graph via the breakable backend: graph breaks let every op run eagerly while still going through the capture/replay path. Useful for debugging capture/replay issues. |
`False` |
bool flag (set to enable) |
| `--enable-cudagraph-gc` |
Enable garbage collection during CUDA graph capture. If disabled (default), GC is frozen during capture to speed up the process. |
`False` |
bool flag (set to enable) |
| `--enable-layerwise-nvtx-marker` |
Enable layerwise NVTX profiling annotations for the model. This adds NVTX markers to every layer for detailed per-layer performance analysis with Nsight Systems. |
`False` |
bool flag (set to enable) |
| `--enable-nccl-nvls` |
Enable NCCL NVLS for prefill heavy requests when available. |
`False` |
bool flag (set to enable) |
| `--enable-symm-mem` |
Enable NCCL symmetric memory for fast collectives. |
`False` |
bool flag (set to enable) |
| `--disable-flashinfer-cutlass-moe-fp4-allgather` |
Disables quantize before all-gather for flashinfer cutlass moe. |
`False` |
bool flag (set to enable) |
| `--enable-tokenizer-batch-encode` |
Enable batch tokenization for improved performance when processing multiple text inputs. Do not use with image inputs, pre-tokenized input\_ids, or input\_embeds. |
`False` |
bool flag (set to enable) |
| `--disable-tokenizer-batch-decode` |
Disable batch decoding when decoding multiple completions. |
`False` |
bool flag (set to enable) |
| `--disable-outlines-disk-cache` |
Disable disk cache of outlines to avoid possible crashes related to file system or high concurrency. |
`False` |
bool flag (set to enable) |
| `--boundary-reduction` |
Select the optional FFN output reduction strategy. Unsupported reduce-scatter paths fall back to all-reduce followed by token redistribution. See [FFN boundary reduction](#ffn-boundary-reduction). |
`auto` |
`auto`, `ar`, `rs`, `rsv`, `rs+rsv` |
| `--disable-custom-all-reduce` |
Disable the custom all-reduce kernel and fall back to NCCL. |
`False` |
bool flag (set to enable) |
| `--enable-mscclpp` |
Enable using mscclpp for small messages for all-reduce kernel and fall back to NCCL. |
`False` |
bool flag (set to enable) |
| `--enable-torch-symm-mem` |
Enable using torch symm mem for all-reduce kernel and fall back to NCCL. Only supports CUDA device SM90 and above. SM90 supports world size 4, 6, 8. SM10 supports world size 6, 8. |
`False` |
bool flag (set to enable) |
| `--disable-overlap-schedule` |
Disable the overlap scheduler, which overlaps the CPU scheduler with GPU model worker. |
`False` |
bool flag (set to enable) |
| `--enable-mixed-chunk` |
Enabling mixing prefill and decode in a batch when using chunked prefill. |
`False` |
bool flag (set to enable) |
| `--enable-dp-attention` |
**Deprecated.** Use `--attn-dp-size ` instead of `--dp-size --enable-dp-attention`. |
`False` |
bool flag (set to enable) |
| `--enable-dp-lm-head` |
Enable vocabulary parallel across the attention TP group to avoid all-gather across DP groups, optimizing performance under DP attention. |
`False` |
bool flag (set to enable) |
| `--enable-two-batch-overlap` |
Enabling two micro batches to overlap. |
`False` |
bool flag (set to enable) |
| `--enable-single-batch-overlap` |
Let computation and communication overlap within one micro batch. |
`False` |
bool flag (set to enable) |
| `--tbo-token-distribution-threshold` |
The threshold of token distribution between two batches in micro-batch-overlap, determines whether to two-batch-overlap or two-chunk-overlap. Set to 0 denote disable two-chunk-overlap. |
`0.48` |
Type: float |
| `--enable-torch-compile` |
Optimize the model with torch.compile. Experimental feature. |
`False` |
bool flag (set to enable) |
| `--enable-torch-compile-debug-mode` |
Enable debug mode for torch compile. |
`False` |
bool flag (set to enable) |
| `--torch-compile-max-bs` |
Set the maximum batch size when using torch compile. |
`32` |
Type: int |
| `--disable-cuda-graph` |
**Deprecated.** Use `--cuda-graph-backend-decode=disabled` and/or `--cuda-graph-backend-prefill=disabled`. |
`False` |
bool flag (set to enable) |
| `--disable-prefill-cuda-graph` |
Disable the prefill-phase CUDA graph. Convenience for `--cuda-graph-backend-prefill=disabled`. |
`False` |
bool flag (set to enable) |
| `--disable-decode-cuda-graph` |
Disable the decode-phase CUDA graph. Convenience for `--cuda-graph-backend-decode=disabled`. |
`False` |
bool flag (set to enable) |
| `--enable-p2p-check` |
Enable P2P check for GPU access, otherwise the p2p access is allowed by default. |
`False` |
bool flag (set to enable) |
| `--triton-attention-reduce-in-fp32` |
Cast the intermediate attention results to fp32 to avoid possible crashes related to fp16. This only affects Triton attention kernels. |
`False` |
bool flag (set to enable) |
| `--triton-attention-num-kv-splits` |
The number of KV splits in flash decoding Triton kernel. Larger value is better in longer context scenarios. The default value is 8. |
`8` |
Type: int |
| `--triton-attention-split-tile-size` |
The size of split KV tile in flash decoding Triton kernel. Used for deterministic inference. |
`None` |
Type: int |
| `--num-continuous-decode-steps` |
Run multiple continuous decoding steps to reduce scheduling overhead. This can potentially increase throughput but may also increase time-to-first-token latency. The default value is 1, meaning only run one decoding step at a time. |
`1` |
Type: int |
| `--delete-ckpt-after-loading` |
Delete the model checkpoint after loading the model. |
`False` |
bool flag (set to enable) |
| `--enable-memory-saver` |
Allow saving memory using release\_memory\_occupation and resume\_memory\_occupation |
`False` |
bool flag (set to enable) |
| `--enable-weights-cpu-backup` |
Save model weights to CPU memory during release\_weights\_occupation and resume\_weights\_occupation |
`False` |
bool flag (set to enable) |
| `--enable-draft-weights-cpu-backup` |
Save draft model weights to CPU memory during release\_weights\_occupation and resume\_weights\_occupation |
`False` |
bool flag (set to enable) |
| `--allow-auto-truncate` |
Allow automatically truncating requests that exceed the maximum input length instead of returning an error. |
`False` |
bool flag (set to enable) |
| `--enable-custom-logit-processor` |
Enable users to pass custom logit processors to the server (disabled by default for security) |
`False` |
bool flag (set to enable) |
| `--enable-watermark` |
Enable Aaronson-Gumbel text watermarking. |
`False` |
bool flag (set to enable) |
| `--watermark-config` |
Watermark settings as a JSON file path or an inline JSON object with optional key, key\_b, context\_window, mixing\_probability, max\_probability, default\_enabled, and enforce\_all fields. |
`None` |
Type: Optional\[str] |
| `--flashinfer-mla-disable-ragged` |
Not using ragged prefill wrapper when running flashinfer mla |
`False` |
bool flag (set to enable) |
| `--disable-shared-experts-fusion` |
Disable shared experts fusion optimization for deepseek v3/r1. |
`False` |
bool flag (set to enable) |
| `--disable-chunked-prefix-cache` |
Disable chunked prefix cache feature for deepseek, which should save overhead for short sequences. |
`False` |
bool flag (set to enable) |
| `--image-processor-backend` |
Image processor backend. `auto` lets Transformers select the best available backend. |
`auto` |
`auto`, `torchvision`, `pil` |
| `--disable-fast-image-processor` |
Deprecated. Use `--image-processor-backend=pil` instead. |
`False` |
bool flag (set to enable) |
| `--enable-return-hidden-states` |
Enable returning hidden states with responses. |
`False` |
bool flag (set to enable) |
| `--return-hidden-states-mode` |
Set the maximum hidden-state return mode supported by the server. `last` allows requests with return\_hidden\_states=False or `last`; `full` also allows return\_hidden\_states=True. |
`None` |
`last`, `full` |
| `--enable-return-routed-experts` |
Enable returning routed experts of each layer with responses. |
`False` |
bool flag (set to enable) |
| `--scheduler-recv-interval` |
The interval to poll requests in scheduler. Can be set to >1 to reduce the overhead of this. |
`1` |
Type: int |
| `--numa-node` |
Sets the numa node for the subprocesses. i-th element corresponds to i-th subprocess. |
`None` |
List\[int] |
| `--enable-deterministic-inference` |
Enable deterministic inference mode with batch invariant ops. |
`False` |
bool flag (set to enable) |
| `--rl-on-policy-target` |
The training system that SGLang needs to match for true on-policy. |
`None` |
`fsdp` |
| `--enable-attn-tp-input-scattered` |
Allow input of attention to be scattered when only using tensor parallelism, to reduce the computational load of operations such as qkv latent. |
`False` |
bool flag (set to enable) |
| `--enable-layernorm-sp` |
Enable sequence parallelism for prefill LayerNorm and residual regions under pure tensor parallelism. Supports Qwen3 dense and Muse Spark. Muse Spark requires TP4/EP4 or TP8/EP8, NVLink/NVSwitch, and `--moe-runner-backend flashinfer_trtllm`. Use ModelOpt NVFP4 with `--moe-a2a-backend flashinfer`, or enable MegaMoE for NVFP4 or BF16. Attention DP and pipeline parallelism are unsupported; speculative decoding is supported only for Muse Spark DFLASH. |
`False` |
bool flag (set to enable) |
| `--enable-megamoe-for-layernorm-sp` |
Use MegaMoE for Muse Spark LayerNorm SP prefill, including BF16 excluded layers. Requires `--enable-layernorm-sp` and DeepGEMM with post-expert normalization (release/v0.2.3). Prefill and decode share TRT-LLM expert weights; decode uses FlashInfer TRT-LLM and all-reduce. FlashInfer A2A is optional. Mixed chunking is unsupported. |
`False` |
bool flag (set to enable) |
| `--enable-prefill-cp` |
Enable context parallelism for the prefill phase. Select the layout with `--cp-strategy`. |
`False` |
bool flag (set to enable) |
| `--cp-strategy` |
Sharding strategy for prefill CP. `zigzag` assigns each rank one early and one late sequence block; `interleave` assigns token indices modulo the CP size. |
`None` |
`zigzag`, `interleave` |
| `--enable-kv-cache-sharding` |
Shard at-rest KV cache storage at page granularity across the group that currently replicates it (attention-CP ranks for GQA models under prefill CP; attention-TP ranks for MLA models), multiplying the group's unique KV capacity. Prefill workers of PD disaggregation only. With NCCL 2.31.2 or newer and supported NVIDIA CUDA hardware, eligible single-node shard groups request zero-SM copy-engine prefix all-gather on a dedicated NCCL communicator. Older NCCL versions keep the SM-kernel all-gather. This path needs cuMem-backed NCCL memory, so on single-node deployments the server sets `NCCL_CUMEM_ENABLE=1` for every NCCL communicator of all server processes unless `NCCL_CUMEM_ENABLE` is already set; it does not under `--enable-memory-saver` or `SGLANG_MOONCAKE_CUSTOM_MEM_POOL`, which keep the SM-kernel all-gather. Multi-node deployments keep NCCL's setting (MNNVL fabrics default it to 1); export `NCCL_CUMEM_ENABLE=1` there to use this path for shard groups within one node. Set `SGLANG_ENABLE_KV_SHARD_ZERO_SM_GATHER=0` to disable this path. Leave `NCCL_CTA_POLICY` unset: a global value overrides both the gather communicator's zero-SM policy and the default policy of forward collectives. |
`False` |
bool flag (set to enable) |
| `--enable-fused-qk-norm-rope` |
Fuse q/k normalization and rope rotary embedding into one kernel. Enabled by default on XPU and disabled elsewhere; `--no-enable-fused-qk-norm-rope` disables it. |
`None` |
Type: bool |
| `--enable-precise-embedding-interpolation` |
Enable corner alignment for resize of embeddings grid to ensure more accurate(but slower) evaluation of interpolated embedding values. |
`False` |
bool flag (set to enable) |
| `--kv-canary` |
KV cache canary mode. 'none' disables the canary (default). 'log' prints them while the server keeps running (production-safe). 'raise' fails the server on the first detected mismatch (CI lane). |
`none` |
`none`, `log`, `raise` |
| `--kv-canary-real-data` |
Check the real KV-cache in the canary. 'none' (default) disables the feature. 'partial' checks the first 16 bytes of each real-KV slot. 'all' checks the full real-KV slot. |
`none` |
Type: str |
| `--kv-canary-sweep-interval` |
Every N forward steps, run a full-pool sweep. |
`0` |
Type: int |
| `--pre-warm-nccl` |
Pre-warm NCCL/RCCL communicators during startup to reduce P99 TTFT cold-start latency. Default: enabled for AMD/HIP (RCCL), disabled for NVIDIA/CUDA (NCCL). |
`False` |
bool flag (set to enable) |
| `--enable-dp-attention-local-control-broadcast` |
With DP-attention, send control messages to every DP group leader and broadcast within attn\_tp\_group instead of the full tp\_group. Eliminates a costly all-ranks gloo sync on every scheduler iteration. |
`False` |
bool flag (set to enable) |
| `--enforce-shared-experts-fusion` |
Enforce shared experts fusion even when it would normally be disabled (e.g. under DeepEP). Mutually exclusive with --disable-shared-experts-fusion. |
`False` |
bool flag (set to enable) |
| `--enable-return-indexer-topk` |
Enable returning indexer topk indices of layers with indexer with responses. |
`False` |
bool flag (set to enable) |
| `--disable-attn-tp-gather` |
Disable scheduler-side attn\_tp\_gather (the upstream SP path that pads num\_tokens to attn\_tp\_size and pre-allocates a gathered buffer). Use for models that manage SP scatter/gather at the model level (e.g., perform their own all\_gather/reduce\_scatter inside attention) and do not consume the upstream gathered\_buffer. Without this, the cuda graph runner pads num\_tokens to attn\_tp\_size, which can cause kernel autotuners to select wrong-sized variants at small batches. |
`False` |
bool flag (set to enable) |
| `--enable-fused-moe-sum-all-reduce` |
Enable fused moe triton and sum all reduce. |
`False` |
bool flag (set to enable) |
| `--gc-threshold` |
Set the garbage collection thresholds (the collection frequency). Accepts 1 to 3 integers. |
— |
Type: int (one or more) |