Skip to content

vllm.v1.worker.gpu.spec_decode.v1_speculator_configs

Speculator configs that only the V1 model runner needs.

These cover speculative methods that the V2 model runner doesn't implement. They will be removed together with the V1 model runner.

Classes:

UnsupportedSpeculatorConfig

Bases: SpeculatorConfig

A speculative method that the V2 model runner doesn't implement.

Source code in vllm/v1/worker/gpu/spec_decode/v1_speculator_configs.py
class UnsupportedSpeculatorConfig(SpeculatorConfig):
    """A speculative method that the V2 model runner doesn't implement."""

V1CustomProposerConfig

Bases: UnsupportedSpeculatorConfig

A V1 custom proposer, loaded from the module path in model.

Source code in vllm/v1/worker/gpu/spec_decode/v1_speculator_configs.py
class V1CustomProposerConfig(UnsupportedSpeculatorConfig):
    """A V1 custom proposer, loaded from the module path in `model`."""

    base_method = "custom_class"

    @classmethod
    def default_model(cls, spec: "SpeculativeConfig") -> str | None:
        raise ValueError(
            "method='custom_class' requires 'model' to contain the custom "
            "proposer module path (e.g., 'my_module.MyProposer')."
        )

    @classmethod
    def configure(cls, spec: "SpeculativeConfig") -> None:
        logger.warning_once(
            "Using a custom class-based proposer backend. This is an "
            "experimental feature and the proposer interface is subject to "
            "breaking changes in future vLLM releases."
        )
        super().configure(spec)