[Attention][Spec Decode] Allow independent drafter attention backend selection (#39930)

Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
This commit is contained in:
Matthew Bonanni
2026-04-27 19:38:09 -07:00
committed by GitHub
parent 146f44b77d
commit fd74c90d9c
6 changed files with 136 additions and 11 deletions
+12
View File
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from dataclasses import replace
from typing import Any
import torch
@@ -67,6 +68,17 @@ class DFlashProposer(SpecDecodeBaseProposer):
# For DFlash we use the input embeddings to embed the mask token
self.parallel_drafting_hidden_state_tensor = None
@override
def _create_draft_vllm_config(self) -> VllmConfig:
base = super()._create_draft_vllm_config()
return replace(
base,
attention_config=replace(
base.attention_config,
use_non_causal=True,
),
)
@override
def _raise_if_multimodal(self):
# Override to allow multimodal inputs since DFlash supports Qwen3.5 models