vLLM Explained

vllm serve flags

Referenceabout 64 min read

Code version: vLLM @ 3e44c0d · 2026-10-22

In one sentence

Almost every vllm serve flag is one field of a config dataclass; many flag defaults are None, and EngineArgs computes the real value later.

Use this page in two ways. To learn how the parser works and which defaults are real, read the first four sections. To look up one flag, go to All flags, or search for its name. The script tools/gen_serve_flags.py makes the big tables from the parser code. The text above the tables is written by hand from the code.

How a config field becomes a flag#

vllm serve builds its parser in make_arg_parser. It adds five arguments by hand: the positional model_tag, --headless, --api-server-count, --config and --grpc. Then it adds the front-end flags and the engine flags (vllm/entrypoints/common/cli_args.py:429-466):

    parser = FrontendArgs.add_cli_args(parser)
    parser = AsyncEngineArgs.add_cli_args(parser)

The engine flags come from EngineArgs.add_cli_args. For each config class, it calls get_kwargs(XConfig), makes one argument group with the class name as its title, and adds one flag per field. The flag name is written by hand. The type, default, choices and help come from the field. Sometimes the code replaces the field default. In this excerpt, three scheduler flags get the default None:

        scheduler_kwargs = get_kwargs(SchedulerConfig)
        scheduler_group = parser.add_argument_group(
            title="SchedulerConfig",
            description=SchedulerConfig.__doc__,
        )
        scheduler_group.add_argument(
            "--max-num-batched-tokens",
            **{
                **scheduler_kwargs["max_num_batched_tokens"],
                "default": None,
            },
        )
        scheduler_group.add_argument(
            "--max-num-scheduled-tokens",
            **{
                **scheduler_kwargs["max_num_scheduled_tokens"],
                "default": None,
            },
        )
        scheduler_group.add_argument(
            "--max-num-seqs",
            **{
                **scheduler_kwargs["max_num_seqs"],
                "default": None,
            },
        )
The flag --max-num-seqs takes everything from SchedulerConfig.max_num_seqs, except the default.

get_kwargs returns a copy of the cached result of _compute_kwargs (vllm/engine/arg_utils.py:324, vllm/engine/arg_utils.py:443-453). _compute_kwargs reads each dataclass field (vllm/engine/arg_utils.py:324-440):

Flag pairs: --enable-x and --disable-x#

FlexibleArgumentParser replaces BooleanOptionalAction with EnableDisableAction (vllm/utils/argparse_utils.py:179). For a flag that starts with --enable-, it adds the opposite --disable- flag, and the reverse. The form --no-enable-x still works, but --help does not show it (vllm/utils/argparse_utils.py:120-151). Other boolean flags get the normal pair, for example --enforce-eager and --no-enforce-eager.

Other parser rules#

The model: positional, not --model#

Give the model as the first positional argument: vllm serve Qwen/Qwen3-0.6B. The positional value goes into args.model (vllm/entrypoints/cli/serve.py:55-57). If you write --model X, the parser logs a warning that the option will be removed, and moves X to the front (vllm/utils/argparse_utils.py:324-353). With no model, the default is Qwen/Qwen3-0.6B (vllm/config/model.py:155). vllm serve --help does not list --model, because add_cli_args skips it when the command line contains both serve and --help (vllm/engine/arg_utils.py:961-962).

How the flags reach VllmConfig#

  1. AsyncEngineArgs.from_cli_args(args) copies each parsed value into the EngineArgs field of the same name (vllm/entrypoints/launchers/api_server/entry.py:52, vllm/engine/arg_utils.py:1962-1970).
  2. create_engine_config(usage_context=OPENAI_API_SERVER) builds the sub-configs (vllm/entrypoints/launchers/api_server/entry.py:82). On the way, it replaces the None defaults. Chunked prefill and prefix caching come from the model (vllm/engine/arg_utils.py:2275), and the scheduler limits come from the GPU memory (vllm/engine/arg_utils.py:2631-2635).
  3. It makes one VllmConfig (vllm/engine/arg_utils.py:2870). VllmConfig.__post_init__ checks the sub-configs together and sets more defaults, for example the compilation mode and async scheduling. See Config classes and How configuration works.

So the generated table below shows the default of the flag. For many tuning flags that is None, which means "EngineArgs or VllmConfig decides". The next section gives the values that they decide.

Flags you tune first for online serving, with their real defaults#

FlagFlag defaultReal default for vllm serve
--max-num-seqsNone (vllm/engine/arg_utils.py:1747)By the memory of one GPU (vllm/engine/arg_utils.py:2960-2992): 160 GiB or more: 1024; 70 GiB or more, and not an A100 or GB10: 1024; else 256. On a CPU: 128 × world size (vllm/engine/arg_utils.py:3021-3024). --performance-mode throughput doubles it (vllm/engine/arg_utils.py:3171-3175). Then it is capped at max_num_batched_tokens (vllm/engine/arg_utils.py:3219-3221).
--max-num-batched-tokensNone (vllm/engine/arg_utils.py:1733)The token budget per step. 160 GiB or more: 16384; 70 GiB or more, and not an A100 or GB10: 8192; else 2048 (vllm/engine/arg_utils.py:2960-2992). TPU v6e/v5e/v5p: 1024/512/256 (vllm/engine/arg_utils.py:2996-3013); CPU: 2048 × world size (vllm/engine/arg_utils.py:3016-3020). Batched DP MoE: 256 (vllm/engine/arg_utils.py:3154-3157). Throughput mode doubles it. Without chunked prefill, at least max_model_len (vllm/engine/arg_utils.py:3181-3186). At most max_num_seqs × max_model_len (vllm/engine/arg_utils.py:3208-3211).
--gpu-memory-utilization0.920.92 of the GPU memory for this instance (vllm/config/cache.py:212).
--max-model-lenNoneThe length from the model's Hugging Face config, after a platform check (vllm/config/model.py:2642-2653). -1 or auto fits the length to the free memory later (vllm/config/model.py:2639-2641). A value above the length in the config (and above model_max_length, if the config has it) raises ValueError, unless VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 (vllm/config/model.py:2657-2662, vllm/config/model.py:2677-2683).
--tensor-parallel-size, -tp11 (vllm/config/parallel.py:142).
--data-parallel-size, -dp11 (vllm/config/parallel.py:147). See Data parallel serving: several engine cores behind one endpoint.
--api-server-count, -ascNone (vllm/entrypoints/common/cli_args.py:442-449)Internal load balancing: data_parallel_size. External or multi-port load balancing, or the Rust front end: 1. Hybrid load balancing: data_parallel_size_local, or 1 when it is not set (vllm/entrypoints/cli/serve.py:113-130). --headless: 0 (vllm/entrypoints/cli/serve.py:69-77).
--enable-prefix-cachingNoneis_prefix_caching_supported of the model (vllm/engine/arg_utils.py:3062-3063). For generative models: on for decoder and hybrid models, off for attention-free and encoder-decoder models (vllm/config/model.py:2276-2291). Also off for an instance that runs only the multimodal encoder (vllm/config/vllm.py:1505-1516).
--enable-chunked-prefillNoneis_chunked_prefill_supported of the model (vllm/engine/arg_utils.py:3034-3035): on for generative models, off for encoder-decoder models (vllm/config/model.py:2229-2236). The engine core also turns it off for a model with no KV cache (vllm/v1/engine/core.py:166-171).
--kv-cache-dtypeautoIf the quantization_config of the checkpoint names a KV cache quantization, that value (vllm/engine/arg_utils.py:2285-2288, vllm/utils/torch_utils.py:509-521). Else the model data type (vllm/utils/torch_utils.py:527-529). Some models, for example DeepSeek V3.2, default to fp8 (vllm/config/cache.py:239-241).
--quantization, -qNoneThe quantization_config of the checkpoint, if it has one; else no quantization (vllm/config/model.py:264-268, vllm/config/model.py:1388-1392).
--enforce-eagerFalseOff (vllm/config/model.py:276). On sets the compilation mode and the CUDA graph mode to NONE (vllm/config/vllm.py:1745-1747).
--compilation-config, -cc; -OCompilationConfig(); O2Optimization level O2 (vllm/config/vllm.py:434). Above O0, the compilation mode is VLLM_COMPILE (vllm/config/vllm.py:1806-1810). O2 sets the CUDA graph mode FULL_AND_PIECEWISE (vllm/config/vllm.py:310). See torch.compile and CUDA graphs in vLLM.
--async-schedulingNone (vllm/config/scheduler.py:211)On, unless the model is a pooling model, the executor does not support it, or another option conflicts (vllm/config/vllm.py:1664-1698). See Async scheduling: overlap the CPU and the GPU.
--enable-expert-parallel, -epFalseOff (vllm/config/parallel.py:190).
--speculative-config, -scNoneNo speculative decoding (vllm/config/vllm.py:383).
--disable-log-statsFalseStats on (vllm/engine/arg_utils.py:1909-1913). With stats on, AsyncLLM makes the stat loggers, which include the Prometheus logger (vllm/v1/engine/async_llm.py:205-213). See Prometheus metrics.

Example, with one assumption: current_platform.get_device_total_memory() reports 70 GiB or more (and less than 160 GiB) for an 80 GB card (vllm/engine/arg_utils.py:2946). The repository does not give this value; it comes from the driver at run time. On one 80 GB H100, the name has no "a100". So vllm serve uses a token budget of 8192 and at most 1024 requests per step. On one 80 GB A100, the name contains "a100", so the same command uses 2048 tokens and at most 256 requests (vllm/engine/arg_utils.py:2970-2993). A platform can still change the config later, in current_platform.check_and_update_config (vllm/config/vllm.py:2046).

Deprecated flags#

Three flags still parse, but they do nothing or forward to a new flag. The help text says that they will be removed in v0.33.0.

FlagWhat happens
--disable-cascade-attnNo effect: cascade attention is removed (vllm/engine/arg_utils.py:468-471). create_model_config warns when it is set (vllm/engine/arg_utils.py:1981-1982).
--mamba-cache-modeNo effect: Mamba prefix caching follows --enable-prefix-caching (vllm/engine/arg_utils.py:462-465). A warning is logged (vllm/engine/arg_utils.py:2294).
--log-config-fileUse --logging-config.pylogging_config_file (vllm/engine/arg_utils.py:456-459). The action warns and keeps the value (vllm/engine/arg_utils.py:474-479). create_logging_config then copies it into that field (vllm/engine/arg_utils.py:2228-2231).

All flags#

319 arguments of vllm serve in 19 groups, rebuilt from make_arg_parser and EngineArgs.add_cli_args. Inside a group the flags are sorted as in vllm serve --help.

positional arguments (1)#

FlagType and defaultHelp (first paragraph)Source
model_tagstr (optional)
default None
The model tag to serve (optional if specified in config)add_argument

options (12)#

FlagType and defaultHelp (first paragraph)Source
--aggregate-engine-loggingflag (store_true)
default False
Log aggregate rather than per-engine statistics when using data parallelism.add_argument
--api-server-count -ascint
default None
How many API server processes to run. Defaults to data_parallel_size if not specified.add_argument
--configstr
default None
Read CLI options from a config file. Must be a YAML with the following options: https://docs.vllm.ai/en/latest/configuration/serve_args.htmladd_argument
--disable-log-statsflag (store_true)
default False
Disable logging statistics.add_argument
--enable-log-requests --disable-log-requestsbool
default False
Enable logging request information, dependent on log level: - INFO: Request ID, parameters and LoRA request. - DEBUG: Prompt inputs (e.g: text, token IDs). You can set the minimum log level via `VLLM_LOGGING_LEVEL`. You can also set a separate log level for request JSON body via `VLLM_REQUEST_BODY_LOG_LEVEL` (default: DEBUG).add_argument
--fail-on-environ-validation --no-fail-on-environ-validationbool
default False
If set, the engine will raise an error if environment validation fails.add_argument
--gdn-prefill-backendstr
default None
choices: flashinfer, triton, cutedsl, aiter_flydsl, sycl
Select GDN prefill backend.add_argument
--grpcflag (store_true)
default False
Launch the Python gRPC (SMG VllmEngine) server on --port instead of the HTTP OpenAI-compatible server. Requires: pip install vllm[grpc]. Cannot be combined with --grpc-port, which enables the Rust frontend's gRPC services.add_argument
--headlessflag (store_true)
default False
Run in headless mode. See multi-node data parallel documentation for more details.add_argument
--kda-decode-backendstr
default None
choices: auto, native, flashinfer, triton
Select KDA decode backend.add_argument
--kda-prefill-backendstr
default None
choices: auto, triton, flashkda, flashinfer, fused
Select KDA prefill backend. 'flashkda' is CUDA-only and 'fused' is ROCm-only; 'auto' picks a supported backend.add_argument
--shutdown-timeoutint
default 0
Shutdown timeout in seconds. 0 = abort, >0 = wait.add_argument

Frontend (61)#

FlagType and defaultHelp (first paragraph)Source
--allow-credentials --no-allow-credentialsbool
default False
Allow credentials.add_argument
FrontendArgs.allow_credentials
--allowed-headersJSON
default ['*']
Allowed headers.add_argument
FrontendArgs.allowed_headers
--allowed-methodsJSON
default ['*']
Allowed methods.add_argument
FrontendArgs.allowed_methods
--allowed-originsJSON
default []
Allowed origins. Cross-origin browser access is disabled by default.add_argument
FrontendArgs.allowed_origins
--anthropic-disabled-thinking-effortstr
default 'auto'
choices: auto, high, low, max, medium, none, xhigh
The ``reasoning_effort`` used for Anthropic Messages, token counting, and render requests with ``thinking: {"type": "disabled"}``. ``none`` turns thinking off for models that support it; ``low`` suits models that always think (e.g. GLM-5.3) or reject ``none`` (e.g. gpt-oss). ``auto`` (default) uses ``low`` when the renderer rejects ``none`` or renders it the same as a thinking effort, and …add_argument
BaseFrontendArgs.anthropic_disabled_thinking_effort
--api-keylist of str (one or more) or None
default None
If provided, the server will require one of these keys to be presented in the header.add_argument
FrontendArgs.api_key
--chat-templatestr or None
default None
The file path to the chat template, or the template in single-line form for the specified model.add_argument
BaseFrontendArgs.chat_template
--chat-template-content-formatstr
default 'auto'
choices: auto, openai, string
The format to render message content within a chat template.add_argument
BaseFrontendArgs.chat_template_content_format
--cohere-formatstr
default 'cmd4'
Cohere ``--tokenizer-mode cohere`` only. Which Cohere prompt format to render: ``cmd4`` (current Command A+ models; default) or ``cmd3`` (earlier Cmd-A and Cmd-A reasoning models). Selecting the wrong format silently produces a prompt the model wasn't trained on, which most commonly manifests as the model emitting text but no citations / tool calls / thinking blocks. Equivalent to passing …add_argument
BaseFrontendArgs.cohere_format
--cohere-is-reasoning-model --no-cohere-is-reasoning-modelbool
default True
Cohere ``/cohere/v2/chat`` only. Whether the served model is a reasoning Command-family model. When True (default), the assistant's chain-of-thought is surfaced as a ``thinking`` content block (or ``content-*`` events on the stream). When False, reasoning is surfaced as Cohere's ``tool_plan`` field (or ``tool-plan-delta`` events) whenever the model emits tool calls, matching older non- reasoning …add_argument
BaseFrontendArgs.cohere_is_reasoning_model
--data-parallel-supervisor-portint
default 9256
HTTP port for aggregated health endpoints in multi-port external LB mode.add_argument
FrontendArgs.data_parallel_supervisor_port
--default-chat-template-kwargsJSON
default None
Default keyword arguments to pass to the chat template renderer. These will be merged with request-level chat_template_kwargs, with request values taking precedence. Useful for setting default behavior for reasoning models. Example: '{"enable_thinking": false}' to disable thinking mode by default for Qwen3/DeepSeek models.add_argument
BaseFrontendArgs.default_chat_template_kwargs
--disable-access-log-for-endpointsstr or None
default None
Comma-separated list of endpoint paths to exclude from uvicorn access logs. This is useful to reduce log noise from high-frequency endpoints like health checks. Example: "/health,/metrics,/ping". When set, access logs for requests to these paths will be suppressed while keeping logs for other endpoints.add_argument
FrontendArgs.disable_access_log_for_endpoints
--disable-fastapi-docs --enable-fastapi-docsbool
default False
Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint.add_argument
FrontendArgs.disable_fastapi_docs
--disable-uvicorn-access-log --enable-uvicorn-access-logbool
default False
Disable uvicorn access log.add_argument
FrontendArgs.disable_uvicorn_access_log
--dp-supervisor-probe-failure-thresholdint
default 3
Number of consecutive connection-error retries before a child health probe is declared failed in multi-port external LB mode.add_argument
FrontendArgs.dp_supervisor_probe_failure_threshold
--dp-supervisor-probe-interval-sfloat
default 5.0
Seconds between aggregated health probes in multi-port external LB mode.add_argument
FrontendArgs.dp_supervisor_probe_interval_s
--dp-supervisor-probe-timeout-sfloat
default 5.0
Seconds to wait between retries when a child health probe fails with a connection error in multi-port external LB mode.add_argument
FrontendArgs.dp_supervisor_probe_timeout_s
--enable-auto-tool-choice --disable-auto-tool-choicebool
default False
Enable auto tool choice for supported models. Use `--tool-call-parser` to specify which parser to use.add_argument
BaseFrontendArgs.enable_auto_tool_choice
--enable-flash-late-interaction --disable-flash-late-interactionbool
default True
If set, run pooling score MaxSim on GPU in the API server process. Can significantly improve late-interaction scoring performance. When disabled, the setting is also propagated to the engine's `PoolerConfig`, so the engine-side scorer uses the reference MaxSim path instead of the fused Triton kernel.add_argument
FrontendArgs.enable_flash_late_interaction
--enable-force-include-usage --disable-force-include-usagebool
default False
If set to True, including usage on every request.add_argument
BaseFrontendArgs.enable_force_include_usage
--enable-log-deltas --disable-log-deltasbool
default True
If set to False, output deltas will not be logged. Relevant only if --enable-log-outputs is set.add_argument
BaseFrontendArgs.enable_log_deltas
--enable-log-outputs --disable-log-outputsbool
default False
If set to True, log model outputs (generations). Requires `--enable-log-requests`. Output text and finish reasons are logged at INFO, while output token IDs are logged at DEBUG.add_argument
BaseFrontendArgs.enable_log_outputs
--enable-offline-docs --disable-offline-docsbool
default False
Enable offline FastAPI documentation for air-gapped environments. Uses vendored static assets bundled with vLLM.add_argument
FrontendArgs.enable_offline_docs
--enable-per-request-metrics --disable-per-request-metricsbool
default False
If set to True, include per-request timing metrics in API responses.add_argument
BaseFrontendArgs.enable_per_request_metrics
--enable-prompt-tokens-details --disable-prompt-tokens-detailsbool
default False
If set to True, enable prompt_tokens_details in usage.add_argument
BaseFrontendArgs.enable_prompt_tokens_details
--enable-request-id-headers --disable-request-id-headersbool
default False
If specified, API server will add X-Request-Id header to responses.add_argument
FrontendArgs.enable_request_id_headers
--enable-scale-out --disable-scale-outbool
default False
If set to True, register the scale-out endpoints (`/render`, `/derender`, `/inference/v1/generate` and `/inference/v1/abort_requests`) on `vllm serve`. Has no effect on `vllm launch render` or `vllm serve --tokens-only` which always register their required endpoints regardless of this flag.add_argument
BaseFrontendArgs.enable_scale_out
--enable-server-load-tracking --disable-server-load-trackingbool
default False
If set to True, enable tracking server_load_metrics in the app state.add_argument
BaseFrontendArgs.enable_server_load_tracking
--enable-ssl-refresh --disable-ssl-refreshbool
default False
Refresh SSL Context when SSL certificate files changeadd_argument
FrontendArgs.enable_ssl_refresh
--enable-tokenizer-info-endpoint --disable-tokenizer-info-endpointbool
default False
Enable the `/tokenizer_info` endpoint. May expose chat templates and other tokenizer configuration.add_argument
BaseFrontendArgs.enable_tokenizer_info_endpoint
--exclude-tools-when-tool-choice-none --no-exclude-tools-when-tool-choice-nonebool
default False
If specified, exclude tool definitions in prompts when tool_choice='none'.add_argument
BaseFrontendArgs.exclude_tools_when_tool_choice_none
--fingerprint-modestr
default 'full'
choices: custom, full, hash, none
Controls the ``system_fingerprint`` field on responses.add_argument
BaseFrontendArgs.fingerprint_mode
--fingerprint-valuestr or None
default None
Literal fingerprint string used when ``--fingerprint-mode=custom``.add_argument
BaseFrontendArgs.fingerprint_value
--grpc-portint or None
default None
Enable the Rust frontend's additional gRPC Inference and Control services on this port. Requires `VLLM_USE_RUST_FRONTEND=1 vllm serve`; HTTP remains on `--port`. Binds on `--host`, or 127.0.0.1 with `--uds`. Cannot be combined with the Python gRPC server's `--grpc` flag.add_argument
FrontendArgs.grpc_port
--h11-max-header-countint
default H11_MAX_HEADER_COUNT_DEFAULT (= 256)
Maximum number of HTTP headers allowed in a request for h11 parser. Helps mitigate header abuse. Default: 256.add_argument
FrontendArgs.h11_max_header_count
--h11-max-incomplete-event-sizeint
default H11_MAX_INCOMPLETE_EVENT_SIZE_DEFAULT (= 4194304)
Maximum size (bytes) of an incomplete HTTP event (header or body) for h11 parser. Helps mitigate header abuse. Default: 4194304 (4 MB).add_argument
FrontendArgs.h11_max_incomplete_event_size
--hoststr or None
default None
Host name.add_argument
FrontendArgs.host
--log-error-stack --no-log-error-stackbool
default envs.VLLM_SERVER_DEV_MODE
If set to True, log the stack trace of error responsesadd_argument
BaseFrontendArgs.log_error_stack
--lora-moduleslist of name=path or JSON (LoRAParserAction)
default None
LoRA modules configurations in either 'name=path' format or JSON format or JSON list format. Example (old format): `'name=path'` Example (new format): `{"name": "name", "path": "lora_path", "base_model_name": "id"}`add_argument
BaseFrontendArgs.lora_modules
--max-log-lenint or None
default None
Max number of prompt characters or prompt ID numbers being printed in log. The default of None means unlimited.add_argument
BaseFrontendArgs.max_log_len
--middlewarestr, repeatable (append)
default []
Additional ASGI middleware to apply to the app. We accept multiple --middleware arguments. The value should be an import path. If a function is provided, vLLM will add it to the server using `@app.middleware('http')`. If a class is provided, vLLM will add it to the server using `app.add_middleware()`.add_argument
FrontendArgs.middleware
--portint
default 8000
Port number.add_argument
FrontendArgs.port
--response-rolestr
default 'assistant'
The role name to return if `request.add_generation_prompt=true`.add_argument
BaseFrontendArgs.response_role
--return-tokens-as-token-ids --no-return-tokens-as-token-idsbool
default False
When `--max-logprobs` is specified, represents single tokens as strings of the form 'token_id:{token_id}' so that tokens that are not JSON-encodable can be identified.add_argument
BaseFrontendArgs.return_tokens_as_token_ids
--root-pathstr or None
default None
FastAPI root_path when app is behind a path based routing proxy.add_argument
FrontendArgs.root_path
--sse-keep-alive-intervalint
default 0
Send an SSE keep-alive comment line every this many seconds when a `/v1/chat/completions` or `/v1/completions` streaming response is idle (queued, prefill, or between tokens), to prevent reverse proxies/tunnels with read timeouts from closing the connection. Defaults to 0, which disables keep-alive comments entirely.add_argument
BaseFrontendArgs.sse_keep_alive_interval
--ssl-ca-certsstr or None
default None
The CA certificates file.add_argument
FrontendArgs.ssl_ca_certs
--ssl-cert-reqsint
default int(ssl.CERT_NONE)
Whether client certificate is required (see stdlib ssl module's).add_argument
FrontendArgs.ssl_cert_reqs
--ssl-certfilestr or None
default None
The file path to the SSL cert file.add_argument
FrontendArgs.ssl_certfile
--ssl-ciphersstr or None
default None
SSL cipher suites for HTTPS (TLS 1.2 and below only). Example: 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305'add_argument
FrontendArgs.ssl_ciphers
--ssl-keyfilestr or None
default None
The file path to the SSL key file.add_argument
FrontendArgs.ssl_keyfile
--tokens-only --no-tokens-onlybool
default False
If set to True, only enable the Tokens In<>Out endpoint. This is intended for use in a Disaggregated Everything setup.add_argument
BaseFrontendArgs.tokens_only
--tool-call-parserstr or None
default None
suggested: f"{{{parsers_str}}} or name registered in --tool-parser-plugin"
Select the tool call parser depending on the model that you're using. This is used to parse the model-generated tool call into OpenAI API format. Required for `--enable-auto-tool-choice`. You can choose any option from the built-in parsers or register a plugin via `--tool-parser-plugin`.add_argument
BaseFrontendArgs.tool_call_parser
--tool-parser-pluginstr
default ''
Special the tool parser plugin write to parse the model-generated tool into OpenAI API format, the name register in this plugin can be used in `--tool-call-parser`.add_argument
BaseFrontendArgs.tool_parser_plugin
--tool-serverstr or None
default None
Comma-separated list of host:port pairs (IPv4, IPv6, or hostname). Examples: 127.0.0.1:8000, [::1]:8000, localhost:1234. Or `demo` for built-in demo tools (browser and Python code interpreter). WARNING: The `demo` Python tool executes model-generated code in Docker without network isolation by default. See the security guide for more information.add_argument
BaseFrontendArgs.tool_server
--tool-strict-levelstr or None
default None
choices: auto, function, parameter, None
Server-side floor for structural-tag based tool calling, applied on top of the per-tool `strict` field. `auto` follows the request's tool choice and per-tool strictness; `function` constrains the tool-call envelope (markup and function name) for every request with tools; `parameter` additionally pins argument schemas, as if every tool were `strict: true`. When unset, the tool parser's default …add_argument
BaseFrontendArgs.tool_strict_level
--trust-request-chat-template --no-trust-request-chat-templatebool
default False
Whether to trust the chat template provided in the request. If False, the server will always use the chat template specified by `--chat-template` or the ones from tokenizer.add_argument
BaseFrontendArgs.trust_request_chat_template
--trust-request-mm-kwargs --no-trust-request-mm-kwargsbool
default False
Whether to trust per-request multimodal kwargs (`mm_processor_kwargs` and `media_io_kwargs`). If False, the server rejects non-empty values because they can change multimodal preprocessing resource usage. Only enable this when API clients are trusted.add_argument
BaseFrontendArgs.trust_request_mm_kwargs
--udsstr or None
default None
Unix domain socket path. If set, host and port arguments are ignored.add_argument
FrontendArgs.uds
--uvicorn-log-levelstr
default 'info'
choices: critical, debug, error, info, trace, warning
Log level for uvicorn.add_argument
FrontendArgs.uvicorn_log_level

ModelConfig (46)#

FlagType and defaultHelp (first paragraph)Source
--allow-deprecated-quantization --no-allow-deprecated-quantizationbool
default False
Whether to allow deprecated quantization methods.add_argument
ModelConfig.allow_deprecated_quantization
--allowed-local-media-pathstr
default ''
Allowing API requests to read local images or videos from directories specified by the server file system. This is a security risk. Should only be enabled in trusted environments.add_argument
ModelConfig.allowed_local_media_path
--allowed-media-domainslist of str (one or more) or None
default None
If set, only media URLs that belong to this domain can be used for multi-modal inputs.add_argument
ModelConfig.allowed_media_domains
--code-revisionstr or None
default None
The specific revision to use for the model code on the Hugging Face Hub. It can be a branch name, a tag name, or a commit id. If unspecified, will use the default version.add_argument
ModelConfig.code_revision
--config-formatstr
default 'auto'
suggested: auto, hf, mistral
The format of the model config to load:add_argument
ModelConfig.config_format
--convertstr
default 'auto'
choices: auto, classify, embed, none
Convert the model using adapters defined in [vllm.model_executor.models.adapters][]. The most common use case is to adapt a text generation model to be used for pooling tasks.add_argument
ModelConfig.convert
--disable-cascade-attn --enable-cascade-attn (deprecated)bool
default None
--disable-cascade-attn is deprecated and has no effect since cascade attention has been removed. It will be removed in v0.33.0.add_argument
--disable-sliding-window --enable-sliding-windowbool
default False
Whether to disable sliding window. If True, we will disable the sliding window functionality of the model, capping to sliding window size. If the model does not support sliding window, this argument is ignored.add_argument
ModelConfig.disable_sliding_window
--dtypestr
default 'auto'
choices: auto, bfloat16, float, float16, float32, half
Data type for model weights and activations:add_argument
ModelConfig.dtype
--enable-cumem-allocator --disable-cumem-allocatorbool
default False
Enable the custom cumem allocator to leverage advanced GPU memory allocation features such as multi-node NVLink support.add_argument
ModelConfig.enable_cumem_allocator
--enable-nccl-comm-suspend --disable-nccl-comm-suspendbool
default False
Enable releasing NCCL communicator memory during sleep mode (``ncclCommSuspend``/``ncclCommResume``). Experimental; when disabled (the default) sleep still releases weights/KV-cache memory as before.add_argument
ModelConfig.enable_nccl_comm_suspend
--enable-prompt-embeds --disable-prompt-embedsbool
default False
If `True`, enables passing text embeddings as inputs via the `prompt_embeds` key.add_argument
ModelConfig.enable_prompt_embeds
--enable-return-routed-experts --disable-return-routed-expertsbool
default False
Capture and return routed-experts auxiliary outputs.add_argument
AuxOutputConfig.enable_return_routed_experts
--enable-sleep-mode --disable-sleep-modebool
default False
Enable sleep mode for the engine (only cuda and hip platforms are supported).add_argument
ModelConfig.enable_sleep_mode
--enable-trace-replay --disable-trace-replaybool
default False
Whether to allow requests to set `SamplingParams.trace_decode_token_ids`, which forces decoding to follow a predetermined token sequence while still computing real logprobs. Reserved for debugging and RL workflows: enabling it reserves a per-request trace buffer, so it is off by default.add_argument
ModelConfig.enable_trace_replay
--enforce-eager --no-enforce-eagerbool
default False
Whether to always use eager-mode PyTorch. If True, we will disable CUDA graph and always execute the model in eager mode. If False, we will use CUDA graph and eager execution in hybrid for maximal performance and flexibility.add_argument
ModelConfig.enforce_eager
--generation-configstr
default 'auto'
The folder path to the generation config. Defaults to `"auto"`, the generation config will be loaded from model path. If set to `"vllm"`, no generation config is loaded, vLLM defaults will be used. If set to a folder path, the generation config will be loaded from the specified folder path. If `max_new_tokens` is specified in generation config, then it sets a server-wide limit on the number of …add_argument
ModelConfig.generation_config
--hf-config-pathstr or None
default None
Name or path of the Hugging Face config to use. If unspecified, model name or path will be used.add_argument
ModelConfig.hf_config_path
--hf-overridesstr or JSON dict
default {}
If a dictionary, contains arguments to be forwarded to the Hugging Face config. If a callable, it is called to update the HuggingFace config.add_argument
ModelConfig.hf_overrides
--hf-tokenstr; bare flag = True
default None
The token to use as HTTP bearer authorization for remote files . If `True`, will use the token generated when running `hf auth login` (stored in `~/.cache/huggingface/token`).add_argument
ModelConfig.hf_token
--io-processor-pluginstr or None
default None
IOProcessor plugin name to load at model startupadd_argument
ModelConfig.io_processor_plugin
--logits-processorslist of str (one or more) or None
default None
One or more logits processors' fully-qualified class names or class definitionsadd_argument
ModelConfig.logits_processors
--logprobs-modestr
default 'raw_logprobs'
choices: processed_logits, processed_logprobs, raw_logits, raw_logprobs
Indicates the content returned in the logprobs and prompt_logprobs. Supported mode: 1) raw_logprobs, 2) processed_logprobs, 3) raw_logits, 4) processed_logits. Raw means the values before applying any logit processors, like bad words. Processed means the values after applying all processors, including temperature and top_k/top_p. Note: for prompt_logprobs, processed_* and raw_* yield identical …add_argument
ModelConfig.logprobs_mode
--max-logprobsint
default 20
Maximum number of log probabilities to return when `logprobs` is specified in `SamplingParams`. The default value comes the default for the OpenAI Chat Completions API. -1 means no cap, i.e. all (output_length * vocab_size) logprobs are allowed to be returned and it may cause OOM.add_argument
ModelConfig.max_logprobs
--max-model-lenint or auto (accepts 1k, 2M; -1 = auto)
default None
Model context length (prompt and output). If unspecified, will be automatically derived from the model config.add_argument
ModelConfig.max_model_len
--modelstr
default 'Qwen/Qwen3-0.6B'
Name or path of the Hugging Face model to use. It is also used as the content for `model_name` tag in metrics output when `served_model_name` is not specified.
Registered only if not ("serve" in sys.argv[1:] and "--help" in sys.argv[1:]).
add_argument
ModelConfig.model
--model-class-overridesJSON
default {}
Override the model class used for one or more architectures, mapping the architecture name to a `"module:class"` target (the same format accepted by `ModelRegistry.register_model`). This registers the target class at runtime, e.g. `{"GlmMoeDsaForCausalLM": "vllm.models.deepseek_v32.nvidia.model:DeepseekV32ForCausalLM"}`. This argument is for development and debugging purposes only.add_argument
ModelConfig.model_class_overrides
--model-implstr
default 'auto'
suggested: auto, terratorch, transformers, vllm
Which implementation of the model to use:add_argument
ModelConfig.model_impl
--override-generation-configJSON
default {}
Overrides or sets generation config. e.g. `{"temperature": 0.5}`. If used with `--generation-config auto`, the override parameters will be merged with the default config from the model. If used with `--generation-config vllm`, only the override parameters are used.add_argument
ModelConfig.override_generation_config
--pooler-configJSON (PoolerConfig) or None
default None
Pooler config which controls the behaviour of output pooling in pooling models.add_argument
ModelConfig.pooler_config
--quantization -qstr or None
default None
Method used to quantize the weights. If `None`, we first check the `quantization_config` attribute in the model config file. If that is `None`, we assume the model weights are not quantized and use `dtype` to determine the data type of the weights.add_argument
ModelConfig.quantization
--quantization-configJSON (QuantizationConfigArgs) or None
default None
User-facing quantization configuration. Carries per-layer-kind specs (linear, moe) and ignore patterns; see :class:`QuantizationConfigArgs`. Auto-populated from the matching online shorthand when `quantization` is one of the values in `ONLINE_QUANT_SHORTHAND_NAMES`.add_argument
ModelConfig.quantization_config
--renderer-num-workersint
default 1
Number of worker threads in the renderer thread pool. The pool is consumed by the async renderer path (e.g. the OpenAI-compatible API server started by `vllm serve`) to parallelize tokenization, chat template rendering, and multimodal preprocessing across concurrent requests.add_argument
ModelConfig.renderer_num_workers
--return-sampling-mask --no-return-sampling-maskbool
default False
Whether to return the post-processing token support for each sample.add_argument
ModelConfig.return_sampling_mask
--revisionstr or None
default None
The specific model version to use. It can be a branch name, a tag name, or a commit id. If unspecified, will use the default version.add_argument
ModelConfig.revision
--runnerstr
default 'auto'
choices: auto, draft, generate, pooling
The type of model runner to use. Each vLLM instance only supports one model runner, even if the same model can be used for multiple types.add_argument
ModelConfig.runner
--seedint
default 0
Random seed for reproducibility.add_argument
ModelConfig.seed
--served-model-namelist of str (one or more) or None
default None
The model name(s) used in the API. If multiple names are provided, the server will respond to any of the provided names. The model name in the model field of a response will be the first name in this list. If not specified, the model name will be the same as the `--model` argument. Noted that this name(s) will also be used in `model_name` tag content of prometheus metrics, if multiple names …add_argument
ModelConfig.served_model_name
--skip-tokenizer-init --no-skip-tokenizer-initbool
default False
Skip initialization of tokenizer and detokenizer. Expects valid `prompt_token_ids` and `None` for prompt from the input. The generated output will contain token ids.add_argument
ModelConfig.skip_tokenizer_init
--sleep-mode-offload-cudagraph --no-sleep-mode-offload-cudagraphbool
default False
Back up CUDA graph memory to CPU during sleep, restored in place on wake. Takes effect with enable_sleep_mode, the cumem backend and CUDA graphs.add_argument
ModelConfig.sleep_mode_offload_cudagraph
--sleep-preserve-parameter-nameslist of str (one or more)
default []
Parameter-name globs to preserve across level-2 sleep. Use target globs for frozen Engram table weights and scales omitted by the trainer (e.g. ``*.engram.embed_tokens.weight*``). Use ``draft.<name>`` for draft-private parameters, or ``draft.*`` for all. The sender must omit these parameters; loaders must preserve their storage.add_argument
ModelConfig.sleep_preserve_parameter_names
--tokenizerstr
default None
Name or path of the Hugging Face tokenizer to use. If unspecified, model name or path will be used.add_argument
ModelConfig.tokenizer
--tokenizer-modestr
default 'auto'
suggested: alpamayo2_super, auto, cohere, deepseek_v32, deepseek_v4, hf, inkling, kimi_k3, mistral
Tokenizer mode:add_argument
ModelConfig.tokenizer_mode
--tokenizer-revisionstr or None
default None
The specific revision to use for the tokenizer on the Hugging Face Hub. It can be a branch name, a tag name, or a commit id. If unspecified, will use the default version.add_argument
ModelConfig.tokenizer_revision
--trust-remote-code --no-trust-remote-codebool
default False
Trust remote code (e.g., from HuggingFace) when downloading the model and tokenizer.add_argument
ModelConfig.trust_remote_code
--use-fp64-gumbel --no-use-fp64-gumbelbool
default False
Whether to use FP64 (instead of FP32) random noise for Gumbel-max and equivalent exponential-race sampling. FP64 preserves lower-tail sampling events that fp32 uniform/exponential draws can truncate, at the cost of significantly lower throughput on most GPUs.add_argument
ModelConfig.use_fp64_gumbel

LoadConfig (9)#

FlagType and defaultHelp (first paragraph)Source
--download-dirstr or None
default None
Directory to download and load the weights, default to the default cache directory of Hugging Face.add_argument
LoadConfig.download_dir
--ignore-patternslist of str (one or more)
default ['original/**/*']
The list of patterns to ignore when loading the model. Default to "original/**/*" to avoid repeated loading of llama's checkpoints.add_argument
LoadConfig.ignore_patterns
--load-formatstr
default 'auto'
The format of the model weights to load.add_argument
LoadConfig.load_format
--model-loader-extra-configstr or JSON dict
default {}
Extra config for model loader. This will be passed to the model loader corresponding to the chosen load_format.add_argument
LoadConfig.model_loader_extra_config
--pt-load-map-locationstr or JSON dict
default 'cpu'
The map location for loading pytorch checkpoint, to support loading checkpoints can only be loaded on certain devices like "cuda", this is equivalent to `{"": "cuda"}`. Another supported format is mapping from different devices like from GPU 1 to GPU 0: `{"cuda:1": "cuda:0"}`. Note that when passed from command line, the strings in dictionary need to be double quoted for json parsing. For more …add_argument
LoadConfig.pt_load_map_location
--safetensors-load-strategystr or None
default None
choices: eager, lazy, prefetch, torchao, None
Specifies the loading strategy for safetensors weights.add_argument
LoadConfig.safetensors_load_strategy
--safetensors-prefetch-block-sizeint (accepts 1k, 2M, 1G)
default DEFAULT_SAFETENSORS_PREFETCH_BLOCK_SIZE
Read size in bytes for each safetensors checkpoint file prefetch.add_argument
LoadConfig.safetensors_prefetch_block_size
--safetensors-prefetch-num-threadsint
default DEFAULT_SAFETENSORS_PREFETCH_NUM_THREADS (= 8)
Number of worker threads used to prefetch safetensors checkpoint files into the OS page cache when safetensors prefetching is enabled.add_argument
LoadConfig.safetensors_prefetch_num_threads
--use-tqdm-on-load --no-use-tqdm-on-loadbool
default True
Whether to enable tqdm for showing progress bar when loading model weights.add_argument
LoadConfig.use_tqdm_on_load

AttentionConfig (1)#

FlagType and defaultHelp (first paragraph)Source
--attention-backendstr or None
default None
Attention backend to use. Use "auto" or None for automatic selection.add_argument
AttentionConfig.backend

MambaConfig (4)#

FlagType and defaultHelp (first paragraph)Source
--enable-mamba-cache-stochastic-rounding --disable-mamba-cache-stochastic-roundingbool
default False
Enable stochastic rounding when writing SSM state to fp16 cache. Uses random bits to unbias the rounding error, which can improve numerical stability for long sequences.add_argument
MambaConfig.enable_stochastic_rounding
--mamba-backendstr
default MambaBackendEnum.TRITON (= 'triton')
Mamba SSU backend to use.add_argument
MambaConfig.backend
--mamba-cache-philox-roundsint
default 0
Number of Philox PRNG rounds for stochastic rounding random number generation. 0 uses the Triton default. Higher values improve randomness quality at the cost of compute.add_argument
MambaConfig.stochastic_rounding_philox_rounds
--mamba-ssu-algorithmstr or None
default None
choices: auto, horizontal, simple, vertical, None
Selective state update algorithm to use with the FlashInfer backend. None defaults to FlashInfer's "auto" algorithm. Forced algorithms must be supported by FlashInfer for the active GPU, state dtype, and decoding mode.add_argument
MambaConfig.ssu_algorithm

StructuredOutputsConfig (2)#

FlagType and defaultHelp (first paragraph)Source
--reasoning-parserstr (none = unset)
default ''
Select the reasoning parser depending on the model that you're using. This is used to parse the reasoning content into OpenAI API format.add_argument
StructuredOutputsConfig.reasoning_parser
--reasoning-parser-pluginstr
default ''
Path to a dynamically reasoning parser plugin that can be dynamically loaded and registered.add_argument
StructuredOutputsConfig.reasoning_parser_plugin

ParallelConfig (53)#

FlagType and defaultHelp (first paragraph)Source
--all2all-backendstr
default 'allgather_reducescatter'
choices: allgather_reducescatter, deepep_high_throughput, deepep_low_latency, deepep_v2, flashinfer_all2allv, flashinfer_nvlink_one_sided, flashinfer_nvlink_two_sided, moonep, mori_high_throughput, mori_low_latency, naive, nixl_ep, pplx
All2All backend for MoE expert parallel communication. Available options:add_argument
ParallelConfig.all2all_backend
--cp-kv-cache-interleave-sizeint
default None
Interleave size of kv_cache storage while using DCP. Store interleave_size tokens on dcp_rank i, then store next interleave_size tokens on dcp_rank i+1. Interleave_size=1: token-level alignment, where token `i` is stored on dcp_rank `i % dcp_world_size`. Interleave_size=block_size: block-level alignment, where tokens are first populated to the preceding ranks. Tokens are then stored in (rank i+1, …add_argument
ParallelConfig.cp_kv_cache_interleave_size
--cpu-distributed-timeout-secondsint or None
default None
Timeout (in seconds) for cpu communication groups. If None, PyTorch's default timeout is used (1800s for gloo).add_argument
ParallelConfig.cpu_distributed_timeout_seconds
--data-parallel-address -dpastr
default None
Address of data parallel cluster head-node.add_argument
--data-parallel-backend -dpbstr
default 'mp'
Backend for data parallel, either "mp" or "ray".add_argument
--data-parallel-external-lb -dpe --no-data-parallel-external-lbbool
default False
Whether to use "external" DP LB mode. Applies only to online serving and when data_parallel_size > 0. This is useful for a "one-pod-per-rank" wide-EP setup in Kubernetes. Supported only for MoE deployments; non-MoE models should use independent vLLM instances without --data-parallel-* arguments. Set implicitly when --data-parallel-rank is provided explicitly to vllm serve.add_argument
ParallelConfig.data_parallel_external_lb
--data-parallel-hybrid-lb -dph --no-data-parallel-hybrid-lbbool
default False
Whether to use "hybrid" DP LB mode. Applies only to online serving and when data_parallel_size > 0. Enables running an AsyncLLM and API server on a "per-node" basis where vLLM load balances between local data parallel ranks, but an external LB balances between vLLM nodes/replicas. Set explicitly in conjunction with --data-parallel-start-rank.add_argument
ParallelConfig.data_parallel_hybrid_lb
--data-parallel-multi-port-external-lb -dpmflag (store_true)
default False
Run a node-local supervisor that launches one external-LB API server per local data parallel rank and exposes aggregated health on a supervisor port.add_argument
--data-parallel-rank -dpnint
default None
Data parallel rank of this instance. When set, enables external load balancer mode for MoE data-parallel deployments. Unsupported for non-MoE models; launch independent vLLM instances instead.add_argument
--data-parallel-rpc-port -dppint
default None
Fixed port for data parallel RPC communication. All nodes must use the same port.add_argument
--data-parallel-size -dpint
default 1
Number of data parallel groups. MoE layers will be sharded according to the product of the tensor, prefill-context, and data parallel sizes.add_argument
ParallelConfig.data_parallel_size
--data-parallel-size-local -dplint
default None
Number of data parallel replicas to run on this node.add_argument
--data-parallel-start-rank -dprint
default None
Starting data parallel rank for secondary nodes.add_argument
--dbo-decode-token-thresholdint
default 32
The threshold for dual batch overlap for batches only containing decodes. If the number of tokens in the request is greater than this threshold, microbatching will be used. Otherwise, the request will be processed in a single batch.add_argument
ParallelConfig.dbo_decode_token_threshold
--dbo-prefill-token-thresholdint
default 512
The threshold for dual batch overlap for batches that contain one or more prefills. If the number of tokens in the request is greater than this threshold, microbatching will be used. Otherwise, the request will be processed in a single batch.add_argument
ParallelConfig.dbo_prefill_token_threshold
--dcp-comm-backendstr or None
default None
choices: a2a, ag_rs, None
Communication backend for Decode Context Parallel (DCP). - "ag_rs": AllGather + ReduceScatter (existing behavior) - "a2a": All-to-All exchange of partial outputs + LSE, then combine with Triton kernel. Reduces NCCL calls from 3 to 2 per layer for MLA models.add_argument
ParallelConfig.dcp_comm_backend
--dcp-kv-cache-interleave-sizeint
default 1
Interleave size of kv_cache storage while using DCP. dcp_kv_cache_interleave_size has been replaced by cp_kv_cache_interleave_size, and will be deprecated when PCP is fully supported.add_argument
ParallelConfig.dcp_kv_cache_interleave_size
--dcp-q-replicate --no-dcp-q-replicatebool
default None
Replicate the MLA query projection within each DCP group so decode can skip the query all-gather.add_argument
ParallelConfig.dcp_q_replicate
--decode-context-parallel-size -dcpint
default 1
Number of ranks that shard the decode KV cache. DCP does not expand the process world size. Without PCP, DCP reuses TP ranks. With PCP, DCP either spans the PCP axis or the full TP x PCP block.add_argument
ParallelConfig.decode_context_parallel_size
--device-idscustom (lambda)
default None
Comma-separated physical GPU device IDs or UUIDs to use (e.g. --device-ids "2,3,5,7"). Avoids setting CUDA_VISIBLE_DEVICES, preserving full GPU topology visibility for GPU-NIC affinity and DeepGEMM. Note: has no effect with Ray executors; use Ray placement groups for GPU selection instead.add_argument
--disable-custom-all-reduce --enable-custom-all-reducebool
default False
Disable the custom all-reduce kernel and fall back to NCCL.add_argument
ParallelConfig.disable_custom_all_reduce
--disable-nccl-for-dp-synchronization --enable-nccl-for-dp-synchronizationbool
default None
Forces the dp synchronization logic in vllm/v1/worker/dp_utils.py to use Gloo instead of NCCL for its all reduce.add_argument
ParallelConfig.disable_nccl_for_dp_synchronization
--distributed-executor-backendstr or None
default None
suggested: external_launcher, mp, ray, uni
Backend to use for distributed model workers, either "ray" or "mp" (multiprocessing). If the product of pipeline_parallel_size and tensor_parallel_size is less than or equal to the number of GPUs available, "mp" will be used to keep processing on a single host. Otherwise, an error will be raised. To use "mp" you must also set nnodes, and to use "ray" you must manually set …add_argument
ParallelConfig.distributed_executor_backend
--distributed-timeout-secondsint or None
default None
Timeout in seconds for distributed operations (e.g., init_process_group). If set, this value is passed to torch.distributed.init_process_group as the timeout parameter. If None, PyTorch's default timeout is used (600s for NCCL). Increase this for multi-node setups where model downloads may be slow.add_argument
ParallelConfig.distributed_timeout_seconds
--dp-sync-intervalint
default 16
Steps between DP finish-sync all-reduces; must match across DP ranks.add_argument
ParallelConfig.dp_sync_interval
--elastic-ep-max-dp-sizeint
default None
Maximum data parallel size supported by elastic expert parallelism.add_argument
ParallelConfig.elastic_ep_max_dp_size
--enable-batch-sharded-sampling --disable-batch-sharded-samplingbool
default None
Use sharded sampling across tensor parallel ranks. Each rank samples a slice of the batch instead of every rank sampling all of it. Currently defaults to False if not set. Enabling it explicitly raises when the config cannot support it (`tensor_parallel_size` must be > 1, `max_num_seqs` at least `tensor_parallel_size`, and `max_logprobs` non-negative). Models opt in by implementing …add_argument
ParallelConfig.enable_batch_sharded_sampling
--enable-dbo --disable-dbobool
default False
Enable dual batch overlap for the model executor.add_argument
ParallelConfig.enable_dbo
--enable-elastic-ep --disable-elastic-epbool
default False
Enable elastic expert parallelism with stateless NCCL groups for DP/EP.add_argument
ParallelConfig.enable_elastic_ep
--enable-ep-weight-filter --disable-ep-weight-filterbool
default False
Skip non-local expert weights during model loading when expert parallelism is active. Each rank only reads its own expert shard from disk, which can drastically reduce storage I/O for MoE models with per-expert weight tensors (e.g. DeepSeek, Mixtral, Kimi-K2.5). Has no effect on 3D fused-expert checkpoints (e.g. GPT-OSS) or non-MoE models.add_argument
ParallelConfig.enable_ep_weight_filter
--enable-eplb --disable-eplbbool
default False
Enable expert parallelism load balancing for MoE layers.add_argument
ParallelConfig.enable_eplb
--enable-expert-parallel -ep --disable-expert-parallelbool
default False
Use expert parallelism instead of tensor parallelism for MoE layers.add_argument
ParallelConfig.enable_expert_parallel
--enable-fault-tolerance --disable-fault-tolerancebool
default False
Enable fault tolerance for detailed error recovery, such as scaling down fault DPEngineCore.add_argument
ParallelConfig.enable_fault_tolerance
--enable-hc-sp --disable-hc-spbool
default False
Enable sequence parallelism for HyperConnection (HC) computation. Currently supported by Qwen4Exp on CUDA/ROCm with TP>1 and PP=1 (ignored when TP=1). Does not change MoE parallelism. MoE SP may enable HC SP independently of this flag.add_argument
ParallelConfig.enable_hc_sp
--enable-shm-tensor-arena --disable-shm-tensor-arenabool
default False
Route large CPU tensors (e.g. multimodal ``pixel_values``) in the engine→worker broadcast through a zero-copy shared-memory arena instead of sending a copy to every reader. **Experimental**: may be reconciled with vLLM's existing multimodal shm tensor caching in a future release. Opt-in; most beneficial for multimodal serving with large images and tensor parallelism. Active only when all queue …add_argument
ParallelConfig.enable_shm_tensor_arena
--eplb-configJSON (EPLBConfig)
default EPLBConfig()
Expert parallelism configuration.add_argument
ParallelConfig.eplb_config
--expert-placement-strategystr
default 'linear'
choices: linear, round_robin
The expert placement strategy for MoE layers:add_argument
ParallelConfig.expert_placement_strategy
--fault-tolerance-configJSON (FaultToleranceConfig)
default FaultToleranceConfig()
The configurations for fault tolerance.add_argument
ParallelConfig.fault_tolerance_config
--master-addrstr
default '127.0.0.1'
distributed master address for multi-node distributed inference when distributed_executor_backend is mp.add_argument
ParallelConfig.master_addr
--master-portint
default 29501
distributed master port for multi-node distributed inference when distributed_executor_backend is mp.add_argument
ParallelConfig.master_port
--max-parallel-loading-workersint or None
default None
Maximum number of parallel loading workers when loading model sequentially in multiple batches. To avoid RAM OOM when using tensor parallel and large models.add_argument
ParallelConfig.max_parallel_loading_workers
--nnodes -nint
default 1
num of nodes for multi-node distributed inference when distributed_executor_backend is mp.add_argument
ParallelConfig.nnodes
--node-rank -rint
default 0
distributed node rank for multi-node distributed inference when distributed_executor_backend is mp.add_argument
ParallelConfig.node_rank
--numa-bind --no-numa-bindbool
default False
Enable NUMA binding for GPU worker subprocesses.add_argument
ParallelConfig.numa_bind
--numa-bind-cpuslist of str (one or more) or None
default None
Optional CPU lists to bind each GPU worker to.add_argument
ParallelConfig.numa_bind_cpus
--numa-bind-nodeslist of int (one or more) or None
default None
NUMA node to bind each GPU worker to.add_argument
ParallelConfig.numa_bind_nodes
--pipeline-parallel-size -ppint
default 1
Number of pipeline parallel groups.add_argument
ParallelConfig.pipeline_parallel_size
--prefill-context-parallel-size -pcpint
default 1
Number of ranks that split prefill sequence computation. PCP expands the process world size but does not increase the KV-cache shard count.add_argument
ParallelConfig.prefill_context_parallel_size
--ray-workers-use-nsight --no-ray-workers-use-nsightbool
default False
Whether to profile Ray workers with nsight, see https://docs.ray.io/en/latest/ray-observability/user-guides/profiling.html#profiling-nsight-profiler.add_argument
ParallelConfig.ray_workers_use_nsight
--tensor-parallel-size -tpint
default 1
Number of tensor parallel groups.add_argument
ParallelConfig.tensor_parallel_size
--ubatch-sizeint
default 0
Number of ubatch size.add_argument
ParallelConfig.ubatch_size
--worker-clsstr
default 'auto'
The full name of the worker class to use. If "auto", the worker class will be determined based on the platform.add_argument
ParallelConfig.worker_cls
--worker-extension-clsstr
default ''
The full name of the worker extension class to use. The worker extension class is dynamically inherited by the worker class. This is used to inject new attributes and methods to the worker class for use in collective_rpc calls. It may also define `init_worker_extension(self)`, called after device and distributed initialization but before model loading, and `destroy_worker_extension(self)`, called …add_argument
ParallelConfig.worker_extension_cls

CacheConfig (21)#

FlagType and defaultHelp (first paragraph)Source
--block-sizeint
default None
Size of a contiguous cache block in number of tokens. Accepts None (meaning "use default"). After construction, always int.add_argument
CacheConfig.block_size
--enable-mamba-shared-prefix-checkpoint --disable-mamba-shared-prefix-checkpointbool
default False
Also register a Mamba "align" checkpoint at the shared-prefix junction -- where an EAGLE/MTP sibling was observed to resume -- instead of only at the prompt tail. Off by default; only takes effect with prefix caching enabled, EAGLE on the Mamba group, and a prefix match unit smaller than the Mamba block size.add_argument
CacheConfig.enable_mamba_shared_prefix_checkpoint
--enable-prefix-caching --disable-prefix-cachingbool
default None
Whether to enable prefix caching.add_argument
CacheConfig.enable_prefix_caching
--gpu-memory-utilization --device-memory-utilizationfloat
default 0.92
The fraction of GPU memory to be used for the model executor, which can range from 0 to 1. For example, a value of 0.5 would imply 50% GPU memory utilization. If unspecified, will use the default value of 0.92. This is a per-instance limit, and only applies to the current vLLM instance. It does not matter if you have another vLLM instance running on the same GPU. For example, if you have two vLLM …add_argument
CacheConfig.gpu_memory_utilization
--kv-cache-dtypestr
default 'auto'
suggested: auto, bfloat16, float16, fp8, fp8_ds_mla, fp8_e4m3, fp8_e5m2, fp8_inc, fp8_per_token_head, int4_per_token_head, int8_per_token_head, nvfp4, nvfp4_4over6, nvfp4_ds_mla, turboquant_3bit_nc, turboquant_4bit_nc, turboquant_k3v4_nc, turboquant_k8v4, ultraquant_4bit
Data type for kv cache storage. If "auto", will use model data type. An explicit float16 or bfloat16 must match the model data type. Custom dtypes can registered by platform backends via ``register_kv_cache_dtype`` are accepted (see vllm.config.cache). CUDA 11.8+ supports fp8 (=fp8_e4m3) and fp8_e5m2. ROCm (AMD GPU) supports fp8 (=fp8_e4m3). Intel Gaudi (HPU) supports fp8 (using fp8_inc). Some …add_argument
CacheConfig.cache_dtype
--kv-cache-dtype-skip-layerslist of str (one or more)
default []
Layer patterns to skip KV cache quantization. Accepts layer indices (e.g., '0', '2', '4') or attention type names (e.g., 'sliding_window').add_argument
CacheConfig.kv_cache_dtype_skip_layers
--kv-cache-memory-bytesint (accepts 1k, 2M, 1G) or None
default None
Size of KV Cache per GPU in bytes. By default, this is set to None and vllm can automatically infer the kv cache size based on gpu_memory_utilization. However, users may want to manually specify the kv cache memory size. kv_cache_memory_bytes allows more fine-grain control of how much memory gets used when compared with using gpu_memory_utilization. Note that kv_cache_memory_bytes (when not-None) …add_argument
CacheConfig.kv_cache_memory_bytes
--kv-offloading-backendstr
default 'native'
choices: lmcache, native
The backend to use for KV cache offloading. Supported backends include 'native' (vLLM native CPU offloading), 'lmcache'. KV offloading is only activated when kv_offloading_size is set.add_argument
CacheConfig.kv_offloading_backend
--kv-offloading-sizefloat or None
default None
Size of the KV cache offloading buffer in GiB. When TP > 1, this is the total buffer size summed across all TP ranks. By default, this is set to None, which means no KV offloading is enabled. When set, vLLM will enable KV cache offloading to CPU using the kv_offloading_backend.add_argument
CacheConfig.kv_offloading_size
--kv-sharing-fast-prefill --no-kv-sharing-fast-prefillbool
default False
In some KV sharing setups, e.g. YOCO (https://arxiv.org/abs/2405.05254), some layers can skip tokens corresponding to prefill. This flag enables attention metadata for eligible layers to be overridden with metadata necessary for implementing this optimization in some models (e.g. Gemma3n)add_argument
CacheConfig.kv_sharing_fast_prefill
--mamba-block-sizeint or None
default None
Size of a contiguous cache block in number of tokens for mamba cache. Can be set only when prefix caching is enabled.add_argument
CacheConfig.mamba_block_size
--mamba-cache-dtypestr
default 'auto'
choices: auto, bfloat16, float16, float32
The data type to use for the Mamba cache (both the conv as well as the ssm state). If set to 'auto', the data type will be inferred from the model config.add_argument
CacheConfig.mamba_cache_dtype
--mamba-cache-mode (deprecated)str
default None
choices: align, none
--mamba-cache-mode is deprecated and will be removed in v0.33.0. It has no effect: Mamba prefix caching follows --enable-prefix-caching.add_argument
CacheConfig.mamba_cache_mode
--mamba-ssm-cache-dtypestr
default 'auto'
choices: auto, bfloat16, float16, float32
The data type to use for the Mamba cache (ssm state only, conv state will still be controlled by mamba_cache_dtype). If set to 'auto', the data type for the ssm state will be determined by mamba_cache_dtype.add_argument
CacheConfig.mamba_ssm_cache_dtype
--num-gpu-blocks-overrideint or None
default None
Number of GPU blocks to use. This overrides the profiled `num_gpu_blocks` if specified. Does nothing if `None`. Used for testing preemption.add_argument
CacheConfig.num_gpu_blocks_override
--prefix-cache-retention-intervalint or None
default 0
Token interval between retained sliding-window and Mamba prefix-cache checkpoints. ``0`` retains only semantic checkpoints, including the latest replay boundary and shared-prefix junctions. Positive values additionally retain periodic checkpoints at the specified interval, which must be a multiple of the scheduler block size. ``None`` retains checkpoints densely. Applies only to sliding-window …add_argument
CacheConfig.prefix_cache_retention_interval
--prefix-caching-hash-algostr
default 'sha256'
choices: sha256, sha256_cbor, xxhash, xxhash_cbor
Set the hash algorithm for prefix caching:add_argument
CacheConfig.prefix_caching_hash_algo
--prefix-match-unitint or None
default None
The finest token boundary (in tokens) a prefix-cache hit can land on.add_argument
CacheConfig.prefix_match_unit
--replayssm-buffer-lenint
default 16
ReplaySSM logical history length B for Mamba2. Triton uses B physical rows and FlashInfer uses B+T, where T is the target verification length. Kimi-K3 speculative decode does not use B. Default 16.add_argument
CacheConfig.replayssm_buffer_len
--swa-bounded-replay --no-swa-bounded-replaybool
default True
Keep the sliding-window KV of models that support it (DeepSeek-V4.1) out of prefix caching and rebuild it after a prefix hit by recomputing the hit's last window. The layers past the last KV-source layer then also run eager prefill steps on each request's trailing window only. Requires model runner V2.add_argument
CacheConfig.swa_bounded_replay
--use-replayssm --no-use-replayssmbool
default False
Use the ReplaySSM Mamba2 decode kernel: cache recent SSM inputs and skip the per-step full-state store, writing the checkpoint back only on flush. Requires the Triton or FlashInfer mamba backend; FlashInfer does not support prefix caching yet. Mamba2 speculative decode requires FlashInfer. With prefix caching, flushes are most efficient when mamba_block_size is a multiple of replayssm_buffer_len, …add_argument
CacheConfig.use_replayssm

OffloadConfig (7)#

FlagType and defaultHelp (first paragraph)Source
--cpu-offload-gbfloat
default 0
The space in GiB to offload to CPU, per GPU. Default is 0, which means no offloading. Intuitively, this argument can be seen as a virtual way to increase the GPU memory size. For example, if you have one 24 GB GPU and set this to 10, virtually you can think of it as a 34 GB GPU. Then you can load a 13B model with BF16 weight, which requires at least 26GB GPU memory. Note that this requires fast …add_argument
UVAOffloadConfig.cpu_offload_gb
--cpu-offload-paramslist of str (one or more)
default set()
The set of parameter name segments to target for CPU offloading. Unmatched parameters are not offloaded. If this set is empty, parameters are offloaded non-selectively until the memory limit defined by `cpu_offload_gb` is reached. Examples: - For parameter name "mlp.experts.w2_weight": - "experts" or "experts.w2_weight" will match. - "expert" or "w2" will NOT match (must be exact segments). This …add_argument
UVAOffloadConfig.cpu_offload_params
--offload-backendstr
default 'auto'
choices: auto, prefetch, uva
The backend for weight offloading. Options: - "auto": Selects based on which sub-config has non-default values (prefetch if offload_group_size > 0, uva if cpu_offload_gb > 0). - "uva": UVA (Unified Virtual Addressing) zero-copy offloading. - "prefetch": Async prefetch with group-based layer offloading.add_argument
OffloadConfig.offload_backend
--offload-group-sizeint
default 0
Group every N layers together. Offload last `offload_num_in_group` layers of each group. Default is 0 (disabled). Example: group_size=8, num_in_group=2 offloads layers 6,7,14,15,22,23,... Unlike cpu_offload_gb, this uses explicit async prefetching to hide transfer latency.add_argument
PrefetchOffloadConfig.offload_group_size
--offload-num-in-groupint
default 1
Number of layers to offload per group. Must be <= offload_group_size. Default is 1.add_argument
PrefetchOffloadConfig.offload_num_in_group
--offload-paramslist of str (one or more)
default set()
The set of parameter name segments to target for prefetch offloading. Unmatched parameters are not offloaded. If this set is empty, ALL parameters of each offloaded layer are offloaded. Uses segment matching: "w13_weight" matches "mlp.experts.w13_weight" but not "mlp.experts.w13_weight_scale".add_argument
PrefetchOffloadConfig.offload_params
--offload-prefetch-stepint
default 1
Number of layers to prefetch ahead. Higher values hide more latency but use more GPU memory. Default is 1.add_argument
PrefetchOffloadConfig.offload_prefetch_step

MultiModalConfig (24)#

FlagType and defaultHelp (first paragraph)Source
--enable-mm-embeds --disable-mm-embedsbool
default False
If `True`, enables passing multimodal embeddings: for `LLM` class, this refers to tensor inputs under `multi_modal_data`; for the OpenAI-compatible server, this refers to chat messages with content `"type": "*_embeds"`.add_argument
MultiModalConfig.enable_mm_embeds
--interleave-mm-strings --no-interleave-mm-stringsbool
default False
Enable fully interleaved support for multimodal prompts, while using --chat-template-content-format=string.add_argument
MultiModalConfig.interleave_mm_strings
--language-model-only --no-language-model-onlybool
default False
If True, disables all multimodal inputs by setting all modality limits to 0. Equivalent to setting `--limit-mm-per-prompt` to 0 for every modality.add_argument
MultiModalConfig.language_model_only
--limit-mm-per-promptJSON
default MultiModalDummyOptions()
The maximum number of input items and options allowed per prompt for each modality.add_argument
MultiModalConfig.limit_per_prompt
--media-io-kwargsJSON
default {}
Additional args passed to process media inputs, keyed by modalities. For example, to set num_frames for video, set `--media-io-kwargs '{"video": {"num_frames": 40} }'`add_argument
MultiModalConfig.media_io_kwargs
--mm-device-do-normalize --no-mm-device-do-normalizebool
default None
Move the do_normalize computation in the mm preprocessing to before the ViT, and let the device do it, so that CPU computation can be saved.add_argument
MultiModalConfig.mm_device_do_normalize
--mm-encoder-attn-backendstr or None
default None
Optional override for the multi-modal encoder attention backend when using vision transformers. Accepts any value from `vllm.v1.attention.backends.registry.AttentionBackendEnum` (e.g. `FLASH_ATTN`).add_argument
MultiModalConfig.mm_encoder_attn_backend
--mm-encoder-attn-dtypestr or None
default None
choices: fp8, None
Optional dtype override for ViT encoder attention. Set to `"fp8"` to enable FP8 quantization via the FlashInfer cuDNN backend. When set to `"fp8"` without a scale file, dynamic scaling is used automatically. See docs/features/quantization/fp8_vit_attn.md for details.add_argument
MultiModalConfig.mm_encoder_attn_dtype
--mm-encoder-fp8-scale-pathstr or None
default None
Path to a JSON file containing per-layer FP8 Q/K/V scales for ViT encoder attention. When provided (with `mm_encoder_attn_dtype="fp8"`), static scaling is used. When omitted, dynamic scaling is used.add_argument
MultiModalConfig.mm_encoder_fp8_scale_path
--mm-encoder-fp8-scale-save-marginfloat
default 1.5
Safety margin multiplied onto scales when auto-saving. A value > 1 leaves headroom so that inputs with larger activations than the calibration set do not overflow FP8 range. Default 1.5.add_argument
MultiModalConfig.mm_encoder_fp8_scale_save_margin
--mm-encoder-fp8-scale-save-pathstr or None
default None
When set with dynamic FP8 scaling (`mm_encoder_attn_dtype="fp8"` and no `mm_encoder_fp8_scale_path`), saves the calibrated scales to this file after the amax history buffer is full. The saved file can then be used as `mm_encoder_fp8_scale_path` in subsequent runs.add_argument
MultiModalConfig.mm_encoder_fp8_scale_save_path
--mm-encoder-only --no-mm-encoder-onlybool
default False
When enabled, skips the language component of the model.add_argument
MultiModalConfig.mm_encoder_only
--mm-encoder-tp-modestr
default 'weights'
choices: data, weights
Indicates how to optimize multi-modal encoder inference using tensor parallelism (TP).add_argument
MultiModalConfig.mm_encoder_tp_mode
--mm-hasher-algorithmstr
default 'blake3'
choices: blake3, sha256, sha512
Hash algorithm to use for multi-modal input caching. Use `"sha256"` or `"sha512"` for FIPS-compliant deployments.add_argument
MultiModalConfig.mm_hasher_algorithm
--mm-ipc-gpu-memory-gbfloat
default 0
Amount of GPU memory (in GiB) sequestered on the engine's device for GPU-side multimodal work in the API-server (frontend) process, such as hardware video decoding.add_argument
MultiModalConfig.mm_ipc_gpu_memory_gb
--mm-processor-cache-gbfloat
default 4
The size (in GiB) of the multi-modal processor cache, which is used to avoid re-processing past multi-modal inputs.add_argument
MultiModalConfig.mm_processor_cache_gb
--mm-processor-cache-typestr
default 'lru'
choices: lru, shm
Type of cache to use for the multi-modal preprocessor/mapper. If `shm`, use shared memory FIFO cache. If `lru`, use mirrored LRU cache.add_argument
MultiModalConfig.mm_processor_cache_type
--mm-processor-devicestr
default 'auto'
choices: ["auto", "cpu"] + ( [current_platform.device_type] if current_platform.device_type not in ("", "cpu") else [] )
Device the HF multi-modal processor runs the image/video transform on. Convenience for `--mm-processor-kwargs '{"device": ...}'`: the value is resolved here and stored there, it is not kept as separate state. Only takes effect for HF "fast" (torchvision-backed) processors, which accept a `device` argument; the others ignore it and stay on CPU.add_argument
--mm-processor-kwargsJSON or None
default None
Arguments to be forwarded to the model's processor for multi-modal data, e.g., image processor. Overrides for the multi-modal processor obtained from `transformers.AutoProcessor.from_pretrained`.add_argument
MultiModalConfig.mm_processor_kwargs
--mm-shm-cache-max-object-size-mbint
default 128
Size limit (in MiB) for each object stored in the multi-modal processor shared memory cache. Only effective when `mm_processor_cache_type` is `"shm"`.add_argument
MultiModalConfig.mm_shm_cache_max_object_size_mb
--mm-tensor-ipcstr
default 'direct_rpc'
choices: direct_rpc, torch_shm
IPC (inter-process communication) method for multimodal tensors. - "direct_rpc": Use msgspec serialization via RPC - "torch_shm": Use torch.multiprocessing shared memory for zero-copy IPC Defaults to "direct_rpc".add_argument
MultiModalConfig.mm_tensor_ipc
--skip-mm-profiling --no-skip-mm-profilingbool
default False
When enabled, skips multimodal memory profiling and only profiles with language backbone model during engine initialization.add_argument
MultiModalConfig.skip_mm_profiling
--video-pruning-methodstr
default 'evs'
choices: evs, vidcom2
Video token pruning algorithm applied when `video_pruning_rate` > 0: - "evs": Efficient Video Sampling. - "vidcom2": Video Compression Commander.add_argument
MultiModalConfig.video_pruning_method
--video-pruning-ratefloat or None
default None
Fraction of video tokens to prune from each video. Value sits in range [0;1); pruning is enabled when it is greater than 0. The pruning algorithm is selected by `video_pruning_method`.add_argument
MultiModalConfig.video_pruning_rate

LoRAConfig (13)#

FlagType and defaultHelp (first paragraph)Source
--default-mm-lorasJSON or None
default None
Dictionary mapping specific modalities to LoRA model paths; this field is only applicable to multimodal models and should be leveraged when a model always expects a LoRA to be active when a given modality is present. Note that currently, if a request provides multiple additional modalities, each of which have their own LoRA, we do NOT apply default_mm_loras because we currently only support one …add_argument
LoRAConfig.default_mm_loras
--enable-lora --disable-lorabool
default None
If True, enable handling of LoRA adapters.add_argument
--enable-mixed-moe-lora-format --disable-mixed-moe-lora-formatbool
default False
If True, force the engine to use the universal 2D MoE LoRA wrapper (`FusedMoEWithLoRA`) regardless of the model's `is_3d_moe_weight` flag, so that 2D-format and 3D-format MoE LoRA adapters can be served in the same deployment. Only meaningful for MoE models; ignored otherwise. Default False keeps the existing model-driven behavior.add_argument
LoRAConfig.enable_mixed_moe_lora_format
--enable-moe-shared-loras --disable-moe-shared-lorasbool
default False
If True, load MoE expert adapters in the "shared-outer" layout, where the gate/up (`w1`/`w3`) lora_A and the down (`w2`) lora_B are shared across all experts (stored once with expert-dim 1) instead of per-expert. The shared factors are broadcast to the expert count at kernel time. 3D-weight MoE models use `FusedMoEWithLoRA` for this layout. Only meaningful for MoE models whose adapters use this …add_argument
LoRAConfig.enable_moe_shared_loras
--enable-tower-connector-lora --disable-tower-connector-lorabool
default False
If `True`, LoRA support for the tower (vision encoder) and connector of multimodal models will be enabled. This is an experimental feature and currently only supports some MM models such as the Qwen VL series. The default is False.add_argument
LoRAConfig.enable_tower_connector_lora
--fully-sharded-loras --no-fully-sharded-lorasbool
default False
By default, only half of the LoRA computation is sharded with tensor parallelism. Enabling this will use the fully sharded layers. At high sequence length, max rank or tensor parallel size, this is likely faster.add_argument
LoRAConfig.fully_sharded_loras
--lora-dtypestr
default 'auto'
choices: auto, bfloat16, float16
Data type for LoRA. If auto, will default to base model dtype.add_argument
LoRAConfig.lora_dtype
--lora-target-moduleslist of str (one or more) or None
default None
Restrict LoRA to specific module suffixes (e.g., ["o_proj", "qkv_proj"]). If None, all supported LoRA modules are used. This allows deployment-time control over which modules have LoRA applied, useful for performance tuning.add_argument
LoRAConfig.target_modules
--max-cpu-lorasint or None
default None
Maximum number of LoRAs to store in CPU memory. Must be >= than `max_loras`.add_argument
LoRAConfig.max_cpu_loras
--max-lora-cls-labelsint or None
default None
Maximum output size for LoRA classification heads. Defaults to the base classification head size.add_argument
LoRAConfig.max_lora_cls_labels
--max-lora-rankint
default 16
choices: 1, 8, 16, 32, 64, 128, 256, 320, 512
Max LoRA rank.add_argument
LoRAConfig.max_lora_rank
--max-lorasint
default 1
Max number of LoRAs in a single batch.add_argument
LoRAConfig.max_loras
--specialize-active-lora --no-specialize-active-lorabool
default False
Whether to construct lora kernel grid by the number of active LoRA adapters. When set to True, separate cuda graphs will be captured for different counts of active LoRAs (powers of 2 up to max_loras), which can improve performance for variable LoRA usage patterns at the cost of increased startup time and memory usage. Only takes effect when cudagraph_specialize_lora is True.add_argument
LoRAConfig.specialize_active_lora

LoggingConfig (3)#

FlagType and defaultHelp (first paragraph)Source
--log-config-file (deprecated)custom action DeprecatedLogConfigFileAction
default argparse.SUPPRESS
suggested: PYLOGGING_CONFIG_FILE
--log-config-file is deprecated and will be removed in v0.33.0. Use --logging-config.pylogging_config_file instead.add_argument
--log-levelstr
default argparse.SUPPRESS
choices: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
Shortcut for --logging-config.log_level. Overrides that field if both are specified.add_argument
--logging-configJSON (LoggingConfig)
default argparse.SUPPRESS
Logging configuration.add_argument
VllmConfig.logging_config

ObservabilityConfig (13)#

FlagType and defaultHelp (first paragraph)Source
--collect-detailed-traceslist of str (one or more) or None
default None
choices: all, model, worker, None
It makes sense to set this only if `--otlp-traces-endpoint` is set. If set, it will collect detailed traces for the specified modules. This involves use of possibly costly and or blocking operations and hence might have a performance impact.add_argument
ObservabilityConfig.collect_detailed_traces
--cudagraph-metrics --no-cudagraph-metricsbool
default False
Enable CUDA graph metrics (number of padded/unpadded tokens, runtime cudagraph dispatch modes, and their observed frequencies at every logging interval).add_argument
ObservabilityConfig.cudagraph_metrics
--custom-histogram-bucketsJSON or None
default None
Custom Prometheus histogram bucket boundaries, as a JSON mapping from bucket-family key to a list of strictly increasing, positive, finite upper bounds. When a family key is present, its list replaces the default buckets for every histogram in that family; families not listed keep their defaults. Known families: `request_latency`, `time_to_first_token`, `inter_token_latency`, `iteration_tokens`, …add_argument
ObservabilityConfig.custom_histogram_buckets
--enable-layerwise-nvtx-tracing --disable-layerwise-nvtx-tracingbool
default False
Enable layerwise NVTX tracing. This traces the execution of each layer or module in the model and attach information such as input/output shapes to nvtx range markers. Noted that this doesn't work with CUDA graphs enabled.add_argument
ObservabilityConfig.enable_layerwise_nvtx_tracing
--enable-logging-iteration-details --disable-logging-iteration-detailsbool
default False
Enable detailed logging of iteration details. If set, vllm EngineCore will log iteration details This includes number of context/generation requests and tokens and the elapsed cpu time for the iteration.add_argument
ObservabilityConfig.enable_logging_iteration_details
--enable-mfu-metrics --disable-mfu-metricsbool
default False
Enable Model FLOPs Utilization (MFU) metrics.add_argument
ObservabilityConfig.enable_mfu_metrics
--jit-monitor-modestr
default 'warn'
choices: error, warn
How to handle post-warmup JIT compilation events.add_argument
ObservabilityConfig.jit_monitor_mode
--jit-monitor-verbose --no-jit-monitor-verbosebool
default False
Log every monitored JIT compile with runtime details. This can emit many logs and add overhead, so it is intended for debugging.add_argument
ObservabilityConfig.jit_monitor_verbose
--kv-cache-metrics --no-kv-cache-metricsbool
default False
Enable KV cache residency metrics (lifetime, idle time, reuse gaps). Uses sampling to minimize overhead. Requires log stats to be enabled (i.e., --disable-log-stats not set).add_argument
ObservabilityConfig.kv_cache_metrics
--kv-cache-metrics-samplefloat
default 0.01
Sampling rate for KV cache metrics (0.0, 1.0]. Default 0.01 = 1% of blocks.add_argument
ObservabilityConfig.kv_cache_metrics_sample
--otlp-traces-endpointstr or None
default None
Target URL to which OpenTelemetry traces will be sent.add_argument
ObservabilityConfig.otlp_traces_endpoint
--per-request-spec-decode-metricsstr
default 'none'
choices: detailed, none, summary
Include per-request speculative-decoding acceptance metrics in the response under `metrics.speculative_decoding`. `none` disables; `summary` adds mean acceptance length, draft acceptance rate, and the step-by-draft-length histogram; `detailed` additionally records the ordered per-step accepted/proposed arrays (one entry per verify step). Only reported for single-sequence requests (`n == 1`), …add_argument
ObservabilityConfig.per_request_spec_decode_metrics
--show-hidden-metrics-for-versionstr or None
default None
Enable deprecated Prometheus metrics that have been hidden since the specified version. For example, if a previously deprecated metric has been hidden since the v0.7.0 release, you use `--show-hidden-metrics-for-version=0.7` as a temporary escape hatch while you migrate to new metrics. The metric is likely to be removed completely in an upcoming release.add_argument
ObservabilityConfig.show_hidden_metrics_for_version

SchedulerConfig (18)#

FlagType and defaultHelp (first paragraph)Source
--async-scheduling --no-async-schedulingbool
default None
If set to False, disable async scheduling. Async scheduling helps to avoid gaps in GPU utilization, leading to better latency and throughput.add_argument
SchedulerConfig.async_scheduling
--disable-chunked-mm-input --enable-chunked-mm-inputbool
default False
If set to true and chunked prefill is enabled, we do not want to partially schedule a multimodal item. Only used in V1 This ensures that if a request has a mixed prompt (like text tokens TTTT followed by image tokens IIIIIIIIII) where only some image tokens can be scheduled (like TTTTIIIII, leaving IIIII), it will be scheduled as TTTT in one step and IIIIIIIIII in the next.add_argument
SchedulerConfig.disable_chunked_mm_input
--disable-hybrid-kv-cache-manager --enable-hybrid-kv-cache-managerbool
default None
If set to True, KV cache manager will allocate the same size of KV cache for all attention layers even if there are multiple type of attention layers like full attention and sliding window attention. If set to None, the default value will be determined based on the environment and starting configuration.add_argument
SchedulerConfig.disable_hybrid_kv_cache_manager
--enable-chunked-prefill --disable-chunked-prefillbool
default None
If True, prefill requests can be chunked based on the remaining `max_num_batched_tokens`.add_argument
SchedulerConfig.enable_chunked_prefill
--long-prefill-token-thresholdint
default 0
For chunked prefill, a request is considered long if the prompt is longer than this number of tokens. 0 disables the cap (default).add_argument
SchedulerConfig.long_prefill_token_threshold
--long-prefill-token-threshold-adaptive --no-long-prefill-token-threshold-adaptivebool
default False
Floor the effective long prefill token threshold at a fair share of the token budget: max_num_batched_tokens divided by the number of queued and running requests. Only applies when long_prefill_token_threshold is nonzero.add_argument
SchedulerConfig.long_prefill_token_threshold_adaptive
--max-num-active-seqsint or None
default None
Maximum number of requests the scheduler admits into RUNNING.add_argument
SchedulerConfig.max_num_active_seqs
--max-num-batched-tokensint (accepts 1k, 2M, 1G)
default None
Maximum number of tokens that can be processed in a single iteration.add_argument
SchedulerConfig.max_num_batched_tokens
--max-num-queued-reqsint or None
default None
Maximum number of requests that can be in-flight (waiting or running) at the same time, or None for no limit. When the limit is reached, new requests are rejected with HTTP 503 so the client can retry on another instance. This bounds vLLM's otherwise unbounded request queue and is primarily a coarse capacity valve.add_argument
SchedulerConfig.max_num_queued_reqs
--max-num-queued-tokensint (accepts 1k, 2M, 1G) or None
default None
Maximum total prompt tokens of requests currently in the prefill phase, or None for no limit. When the limit is reached, new requests are rejected with HTTP 503.add_argument
SchedulerConfig.max_num_queued_tokens
--max-num-scheduled-tokensint (accepts 1k, 2M, 1G) or None
default None
Maximum number of tokens that the scheduler may issue in a single iteration.add_argument
SchedulerConfig.max_num_scheduled_tokens
--max-num-seqsint
default None
Maximum number of sequences to be processed in a single iteration.add_argument
SchedulerConfig.max_num_seqs
--prefill-schedule-intervalint
default 1
Only admit prefill once every N engine steps, leaving the steps in between to decode alone. 1 (the default) admits prefill on every step.add_argument
SchedulerConfig.prefill_schedule_interval
--scheduler-clsstr or None
default None
The scheduler class to use. "vllm.v1.core.sched.scheduler.Scheduler" is the default scheduler. Can be a class directly or the path to a class of form "mod.custom_class".add_argument
SchedulerConfig.scheduler_cls
--scheduler-reserve-full-isl --no-scheduler-reserve-full-islbool
default True
If True, the scheduler checks whether the full input sequence length fits in the KV cache before admitting a new request, rather than only checking the first chunk. Prevents over-admission and KV cache thrashing with chunked prefill.add_argument
SchedulerConfig.scheduler_reserve_full_isl
--scheduling-policystr
default 'fcfs'
choices: fcfs, priority
The scheduling policy to use:add_argument
SchedulerConfig.policy
--stream-intervalint
default 1
The interval (or buffer size) for streaming in terms of token length. A smaller value (1) makes streaming smoother by sending each token immediately, while a larger value (e.g., 10) reduces host overhead and may increase throughput by batching multiple tokens before sending.add_argument
SchedulerConfig.stream_interval
--watermarkfloat
default 0.0
Fraction of total KV cache blocks to keep free (the watermark) when admitting waiting or preempted requests into the running queue. This headroom helps avoid frequent KV cache eviction and the resulting repeated preemption of requests when GPU memory is scarce. Must be in the range [0.0, 1.0); 0.0 (the default) disables the watermark.add_argument
SchedulerConfig.watermark

CompilationConfig (2)#

FlagType and defaultHelp (first paragraph)Source
--cudagraph-capture-sizeslist of int (one or more)
default None
Sizes to capture cudagraph. - None (default): capture sizes are inferred from vllm config. - list[int]: capture sizes are specified as given.add_argument
CompilationConfig.cudagraph_capture_sizes
--max-cudagraph-capture-sizeint
default None
The maximum cudagraph capture size.add_argument
CompilationConfig.max_cudagraph_capture_size

KernelConfig (6)#

FlagType and defaultHelp (first paragraph)Source
--enable-flashinfer-autotune --disable-flashinfer-autotunebool
default None
Benchmark FlashInfer kernel implementations during warmup and use the fastest. Enabled by default except at `-O0`; disable for faster startup.add_argument
KernelConfig.enable_flashinfer_autotune
--ir-op-priorityJSON (IrOpPriorityConfig)
default IrOpPriorityConfig()
vLLM IR op priority for dispatching/lowering during the forward pass. Platform defaults appended automatically during VllmConfig.__post_init__.add_argument
KernelConfig.ir_op_priority
--linear-backendcustom (lambda)
default 'auto'
choices: aiter, auto, b12x, conch, cutlass, deep_gemm, emulation, exllama, fbgemm, flashinfer_b12x, flashinfer_cudnn, flashinfer_cutedsl, flashinfer_cutlass, flashinfer_trtllm, humming, machete, marlin, torch, triton, xpu, xpu_woq
Backend for linear layer GEMM kernels. Available options:add_argument
KernelConfig.linear_backend
--moe-backendcustom (lambda)
default 'auto'
choices: aiter, aiter_mega_moe, aiter_triton_mxfp4_bf16, aiter_triton_mxfp4_mxfp4, auto, b12x, batched_triton, cutlass, deep_gemm, deep_gemm_mega_moe, emulation, flashinfer_b12x, flashinfer_cutedsl, flashinfer_cutlass, flashinfer_moe_ep_cutedsl, flashinfer_moe_ep_mega_deep_gemm, flashinfer_trtllm, flydsl, hpc, humming, marlin, rdna3, triton, triton_unfused
Backend for MoE expert computation kernels. Available options:add_argument
KernelConfig.moe_backend
--monokernel --no-monokernelbool
default False
If True, run the eligible layers of decode steps on the model's MonoKernel: a persistent kernel that runs most or all of one decoder layer in a single launch (DeepSeek-V4.1 on MI355X). A deployment that cannot run it is refused at startup.add_argument
KernelConfig.monokernel
--sparse-indexer-topk-backendcustom (lambda)
default 'auto'
choices: aiter, auto, cooperative, deep_select, flashinfer, per_row, persistent, torch
Backend for the DSA sparse indexer decode top-k kernel. Available options:add_argument
KernelConfig.sparse_indexer_topk_backend

VllmConfig (23)#

FlagType and defaultHelp (first paragraph)Source
--additional-configstr or JSON dict
default {}
Additional config for specified platform. Different platforms may support different configs. Make sure the configs are valid for the platform you are using. Contents must be hashable.add_argument
VllmConfig.additional_config
--attention-config -acJSON (AttentionConfig)
default AttentionConfig()
Attention configuration.add_argument
VllmConfig.attention_config
--aux-output-configJSON (AuxOutputConfig)
default AuxOutputConfig()
Execution auxiliary output configuration.add_argument
VllmConfig.aux_output_config
--compilation-config -ccJSON (CompilationConfig)
default CompilationConfig()
`torch.compile` and cudagraph capture configuration for the model.add_argument
VllmConfig.compilation_config
--diffusion-config -dcJSON
default None
Diffusion LLM (dLLM) configuration.add_argument
VllmConfig.diffusion_config
--ec-manager-configJSON (EncoderCacheManagerConfig)
default EncoderCacheManagerConfig()
The configurations for custom encoder cache manager.add_argument
VllmConfig.ec_manager_config
--ec-transfer-configJSON (ECTransferConfig) or None
default None
The configurations for distributed EC cache transfer.add_argument
VllmConfig.ec_transfer_config
--engram-configJSON (EngramConfig) or None
default None
N-gram embedding storage and sharding settings.add_argument
VllmConfig.engram_config
--kernel-configJSON (KernelConfig)
default KernelConfig()
Kernel configuration.add_argument
VllmConfig.kernel_config
--kv-events-configJSON (KVEventsConfig) or None
default None
The configurations for event publishing.add_argument
VllmConfig.kv_events_config
--kv-transfer-configJSON (KVTransferConfig) or None
default None
The configurations for distributed KV cache transfer.add_argument
VllmConfig.kv_transfer_config
--optimization-levelstr
default OptimizationLevel.O2 (= 2)
The optimization level. These levels trade startup time cost for performance, with -O0 having the best startup time and -O3 having the best performance. -O2 is used by default. See OptimizationLevel for full description.add_argument
VllmConfig.optimization_level
--performance-modestr
default 'balanced'
choices: balanced, interactivity, throughput
Performance mode for runtime behavior, 'balanced' is the default. 'interactivity' favors low end-to-end per-request latency at small batch sizes (fine-grained CUDA graphs, latency-oriented kernels). 'throughput' favors aggregate tokens/sec at high concurrency (larger CUDA graphs, more aggressive batching, throughput-oriented kernels).add_argument
VllmConfig.performance_mode
--profiler-configJSON (ProfilerConfig)
default ProfilerConfig()
Profiling configuration.add_argument
VllmConfig.profiler_config
--reasoning-configJSON (ReasoningConfig) or None
default None
The configurations for reasoning model.add_argument
VllmConfig.reasoning_config
--spec-methodstr or None
default None
choices: bailing_hybrid_mtp, bailing_hybrid_v3_mtp, custom_class, deepseek_mtp, dflash, dots3_note_mtp, draft_model, dspark, eagle, eagle3, ernie_mtp, exaone4_5_mtp, exaone_moe_mtp, extract_hidden_states, gemma4_mtp, glm4_moe_lite_mtp, glm4_moe_mtp, glm5_next_mtp, glm_ocr_mtp, hy_v3_mtp, hy_v4_mtp, inkling_mtp, kimi_k3_mtp, longcat_flash_mtp, mimo_mtp, mimo_v2_mtp, minimax_m3_mtp, mtp, nemotron_h_mtp, ngram, ngram_gpu, pangu_ultra_moe_mtp, qwen3_5_mtp, qwen3_next_mtp, qwen4_exp_mtp, step3p5_mtp, step5_mtp, suffix, None
The name of the speculative method to use. If users provide and set the `model` param, the speculative method type will be detected automatically if possible, if `model` param is not provided, the method name must be provided.add_argument
SpeculativeConfig.method
--spec-modelstr or None
default None
The name of the draft model, eagle head, or additional weights, if provided.add_argument
SpeculativeConfig.model
--spec-tokensint
default None
The number of speculative tokens, if provided. It will default to the number in the draft model config if present, otherwise, it is required.add_argument
SpeculativeConfig.num_speculative_tokens
--speculative-config -scJSON
default None
Speculative decoding configuration.add_argument
VllmConfig.speculative_config
--structured-outputs-configJSON (StructuredOutputsConfig)
default StructuredOutputsConfig()
Structured outputs configuration.add_argument
VllmConfig.structured_outputs_config
--watchdog-configJSON (WatchdogConfig)
default WatchdogConfig()
Configuration for the stack-dump watchdog.add_argument
VllmConfig.watchdog_config
--watermark-configJSON
default None
Text watermarking configuration.add_argument
VllmConfig.watermark_config
--weight-transfer-configJSON (WeightTransferConfig) or None
default None
The configurations for weight transfer during RL training.add_argument
VllmConfig.weight_transfer_config

Check yourself#

  1. 1
    You start vllm serve with --no-enable-prefix-caching. Does it work? Which form does --help show?
    easy
    Show answer

    It works. EnableDisableAction keeps the --no- form for old scripts, but hides it from the help. The help shows --enable-prefix-caching and --disable-prefix-caching (vllm/utils/argparse_utils.py:120-145).

  2. 2
    You serve a decoder model on one GPU with 48 GiB of memory and set no scheduler flags. What are max_num_seqs and max_num_batched_tokens? And with --performance-mode throughput?
    medium
    Show answer

    48 GiB is below 70 GiB, so the defaults are 256 requests and 2048 tokens (vllm/engine/arg_utils.py:2984-2992). Throughput mode doubles both values that you did not set: 512 and 4096 (vllm/engine/arg_utils.py:3171-3175). Chunked prefill is on for this model, so the max_model_len floor does not apply (vllm/engine/arg_utils.py:3181-3186).

  3. 3
    The generated table says that the default of --enable-chunked-prefill is None, and SchedulerConfig says True. For a Whisper-style encoder-decoder model, is chunked prefill on?
    hard
    Show answer

    No. EngineArgs.add_cli_args passes None, and _set_default_chunked_prefill_and_prefix_caching_args replaces it with model_config.is_chunked_prefill_supported (vllm/engine/arg_utils.py:3031-3035). That property returns False for a generative encoder-decoder model (vllm/config/model.py:2229-2233). So vllm serve never uses the dataclass value True (vllm/config/scheduler.py:134).