Skip to content

vllm.v1.worker.gpu.spec_decode

Modules:

Name Description
eagle
rejection_sample

init_speculator

init_speculator(vllm_config: VllmConfig, device: device)
Source code in vllm/v1/worker/gpu/spec_decode/__init__.py
def init_speculator(
    vllm_config: VllmConfig,
    device: torch.device,
):
    speculative_config = vllm_config.speculative_config
    assert speculative_config is not None
    if speculative_config.use_eagle():
        from vllm.v1.worker.gpu.spec_decode.eagle import EagleSpeculator

        return EagleSpeculator(vllm_config, device)
    raise NotImplementedError(f"{speculative_config.method} is not supported yet.")