vllm-project/vllm · error · ValueError

Model Runner V2 requires Triton.

Error message

Model Runner V2 requires Triton.

What it means

The V2 model runner depends on Triton kernels (HAS_TRITON is False when the triton package is unavailable in the venv). `_validate_v2_model_runner` raises immediately if Triton is not importable, before any other V2 feature checks.

Source

Thrown at vllm/config/vllm.py:2482

        if model_config is not None and (
            model_config.logits_processors or has_logitsproc_plugins
        ):
            unsupported.append("custom logits processors")

        if model_config is not None and model_config.enable_prompt_embeds:
            unsupported.append("prompt embeds")

        if self.cache_config.kv_sharing_fast_prefill:
            # Will be added by https://github.com/vllm-project/vllm/pull/35045
            unsupported.append("KV sharing fast prefill")

        return unsupported

    def _validate_v2_model_runner(self) -> None:
        """Check for features not yet supported by the V2 model runner."""
        if not HAS_TRITON:
            raise ValueError("Model Runner V2 requires Triton.")

        unsupported = self._get_v2_model_runner_unsupported_features()
        if unsupported:
            raise ValueError(
                f"Model Runner V2 does not yet support: {', '.join(unsupported)}"
            )

    def validate_block_size(self) -> None:
        """Validate block_size against DCP and mamba constraints.

        Called after Platform.update_block_size_for_backend() has
        finalised block_size.
        """
        block_size = self.cache_config.block_size

        # DCP interleave-size compatibility
        if self.parallel_config.decode_context_parallel_size > 1:
            if self.parallel_config.dcp_kv_cache_interleave_size > 1 and (

View on GitHub (pinned to c794754062)

Solutions

  1. Install Triton into the environment: `uv pip install triton` (or reinstall vLLM so its triton dependency resolves).
  2. Or fall back to the legacy runner by setting `VLLM_USE_V2_MODEL_RUNNER=0` (noting some features like prefill context parallelism then become unavailable).
  3. Verify with `python -c "import triton"` before launching.

Example fix

# before
python -c "import triton"  # ModuleNotFoundError
vllm serve model  # raises: Model Runner V2 requires Triton.

# after
uv pip install triton
python -c "import triton"  # ok
vllm serve model
Defensive patterns

Strategy: validation

Validate before calling

try:
    import triton  # noqa: F401
    HAS_TRITON = True
except ImportError:
    HAS_TRITON = False
if use_v2_model_runner and not HAS_TRITON:
    raise SystemExit("install triton or set VLLM_USE_V2_MODEL_RUNNER=0")

Type guard

def v2_runner_available() -> bool:
    try:
        import triton  # noqa: F401
        return True
    except ImportError:
        return False

Try / catch

try:
    LLM(**args)
except ValueError as e:
    if "requires Triton" in str(e):
        os.environ["VLLM_USE_V2_MODEL_RUNNER"] = "0"
    else:
        raise

Prevention

When it happens

Trigger: Enabling the V2 model runner (via VLLM_USE_V2_MODEL_RUNNER=1 or defaulting to it) in an environment where the `triton` package failed to install or import.

Common situations: Minimal/CPU containers or custom builds where triton was skipped; broken triton installs after a torch upgrade; platform wheels without triton bundled.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/3030928d232b3fb3. Report an issue: GitHub.