Skip to content

vllm.v1.worker.gpu.spec_decode.eagle.config

Functions:

wrap_eagle_hf_config(spec, method)

Wrap the draft hf_config in an EAGLEConfig for the built-in method, unless it is one already.

Source code in vllm/v1/worker/gpu/spec_decode/eagle/config.py
def wrap_eagle_hf_config(spec: SpeculativeConfig, method: str) -> None:
    """Wrap the draft hf_config in an EAGLEConfig for the built-in `method`,
    unless it is one already."""
    draft = spec.draft_model_config
    if isinstance(draft.hf_config, (EAGLEConfig, SpeculatorsConfig)):
        return
    draft.hf_config = EAGLEConfig(draft.hf_config, method=method, model_type="eagle")
    spec.update_arch_()