SGLang Configuration (DynamoSGLangConfig)

Field reference for the Dynamo-specific CLI flags and environment variables of the SGLang backend wrapper.

View as Markdown

DynamoSGLangConfig holds the Dynamo-specific configuration for the SGLang backend (python -m dynamo.sglang). Every field, type, default, and choice on this page comes from the DynamoSGLangArgGroup and DynamoSGLangConfig definitions. For features and operational details, see the SGLang Reference Guide.

These are only the Dynamo wrapper flags. The SGLang backend also accepts every native SGLang ServerArgs engine argument (--model-path, --tp-size, --mem-fraction-static, and so on) in the same command, plus the cross-cutting Dynamo Runtime flags (--namespace, --endpoint, tool/reasoning parsers). This page covers neither — only the SGLang-specific DYN_SGL_* surface.

How the config is loaded

Each field is both a CLI flag and an environment variable. The CLI flag takes precedence; the environment variable is the fallback. Boolean fields are negatable — --enable-multimodal sets it on, --no-enable-multimodal sets it off.

Set flags in the worker container’s args and environment variables in its env, under the SGLang worker service of a DynamoGraphDeployment (DGD). The operator passes both through to the process without validation.

1spec:
2 services:
3 SGLangDecodeWorker:
4 extraPodSpec:
5 mainContainer:
6 command:
7 - python3
8 - -m
9 - dynamo.sglang
10 args:
11 - --model-path
12 - Qwen/Qwen3-32B
13 - --enable-multimodal
14 env:
15 - name: DYN_SGL_EMBEDDING_TRANSFER_MODE
16 value: nixl-read

Worker role

The SGLang wrapper selects a worker role from these flags and the native --disaggregation-mode argument. The default, with no role-specific flags, is a standard LLM decode or aggregated worker.

--enable-multimodal
booleanDefaults to false

Enable multimodal processing for workers that receive raw image or video inputs. Combine it with --dedicated-mm-encoder only for internal workers that consume or forward embeddings from a separate encode worker.

Environment variable: DYN_SGL_ENABLE_MULTIMODAL

--dedicated-mm-encoder
booleanDefaults to false

Select the internal multimodal topology with a dedicated encode worker. Set this on PD, prefill, and decode workers that consume or forward precomputed embeddings. Do not set it on native P/D workers that receive raw media metadata or on the encode worker itself.

Requires --enable-multimodal and --disaggregation-mode=pd, --disaggregation-mode=prefill, or --disaggregation-mode=decode.

Environment variable: DYN_SGL_DEDICATED_MM_ENCODER

--embedding-worker
booleanDefaults to false

Run as an embedding worker component. Also sets SGLang’s native --is-embedding.

Environment variable: DYN_SGL_EMBEDDING_WORKER

--image-diffusion-worker
booleanDefaults to false

Run as an image diffusion worker for text-to-image generation.

Environment variable: DYN_SGL_IMAGE_DIFFUSION_WORKER

--video-generation-worker
booleanDefaults to false

Run as a video generation worker for text-to-video and image-to-video (T2V/I2V) generation.

Environment variable: DYN_SGL_VIDEO_GENERATION_WORKER

--enable-rl
booleanDefaults to false

Enable reinforcement-learning training support. Registers the call_tokenizer_manager engine route for generic tokenizer_manager passthrough.

Environment variable: DYN_SGL_ENABLE_RL

Embedding transfer

--embedding-transfer-mode
stringDefaults to nixl-write

Worker embedding transfer mode. local keeps embeddings in-process; nixl-write and nixl-read move them over NIXL RDMA (writer-initiated or reader-initiated).

Allowed values: local nixl-write nixl-read

Environment variable: DYN_SGL_EMBEDDING_TRANSFER_MODE

Disaggregation

--disagg-config
stringDefaults to null

Path to a disaggregation configuration file in YAML format. Must be set together with --disagg-config-key.

Environment variable: DYN_SGL_DISAGG_CONFIG

--disagg-config-key
stringDefaults to null

Key selecting a section from a nested disaggregation configuration file, for example prefill or decode. Must be set together with --disagg-config.

Environment variable: DYN_SGL_DISAGG_CONFIG_KEY

Multimodal decoding

--frontend-decoding
booleanDefaults to false

Decode multimodal images in the Rust frontend and transfer the pre-decoded pixels to the backend via NIXL RDMA, bypassing in-engine HTTP fetch and decode. Incompatible with the deprecated EPD multimodal flags (--multimodal-encode-worker / --multimodal-worker); use it on the default aggregated decode worker instead.

Environment variable: DYN_SGL_FRONTEND_DECODING

Tracing

--sglang-trace-level
integerDefaults to 2

SGLang global trace level, applied when SGLang’s --enable-trace is set.

Allowed values: 1 — minimal 2 — per-request 3 — +decode_loop 4 — full

Environment variable: SGLANG_TRACE_LEVEL

Deprecated

These flags are retained for backward compatibility and will be removed in a future release. Each is mapped to its replacement at startup with a deprecation warning.

--use-sglang-tokenizer
booleanDefaults to falseDeprecated

Use SGLang’s tokenizer for pre- and post-processing. Deprecated — use --dyn-chat-processor sglang on the frontend instead, which provides the same SGLang-native processing with KV router support. See SGLang Chat Processor.

Environment variable: DYN_SGL_USE_TOKENIZER

--multimodal-encode-worker
booleanDefaults to falseDeprecated

Deprecated — use --enable-multimodal --disaggregation-mode=encode. The legacy flag is mapped to those arguments at startup.

Environment variable: DYN_SGL_MULTIMODAL_ENCODE_WORKER

--multimodal-worker
booleanDefaults to falseDeprecated

Deprecated — use --enable-multimodal --dedicated-mm-encoder with --disaggregation-mode=pd, --disaggregation-mode=prefill, or --disaggregation-mode=decode. The legacy flag is mapped to those arguments at startup.

Environment variable: DYN_SGL_MULTIMODAL_WORKER

Validation rules

  • --disagg-config and --disagg-config-key must both be set, or both unset.
  • --dedicated-mm-encoder requires --enable-multimodal.
  • --dedicated-mm-encoder is valid only with --disaggregation-mode=pd, --disaggregation-mode=prefill, or --disaggregation-mode=decode; do not combine it with --disaggregation-mode=encode.
  • --frontend-decoding cannot be combined with the dedicated EPD multimodal topology (--dedicated-mm-encoder, --multimodal-encode-worker, or --multimodal-worker).