Skip to main content
SGLang supports various environment variables that can be used to configure its runtime behavior. This document provides a comprehensive list.
SGLang uses two prefixes for environment variables: SGL_ and SGLANG_. This is due to historical reasons. While both are currently supported for different settings, future versions might consolidate them.

General Configuration

Performance Tuning

DeepGEMM Configuration

DeepGEMM is an advanced optimization for NVIDIA Hopper (SM90) and Blackwell (SM100) GPUs. It’s automatically enabled when the package is installed.

DeepEP Configuration

DeepEP is optimized for DeepSeek models with expert parallelism.

MORI Configuration

MORI is an advanced MoE optimization framework for multi-node deployments.

NSA Backend Configuration

NSA backend is optimized for DeepSeek V3.2 and later models.

Memory Management

Model-Specific Options

Quantization

Distributed Computing

Testing & Debugging

These variables are primarily used for internal testing, continuous integration, or debugging. Do not use in production unless you understand the implications.

Profiling & Benchmarking

Storage & Caching

Function Calling / Tool Use

See Also