Skip to content

Commit afcda4e

Browse files
vadiklyutiybbartels
authored andcommitted
[BUG] Qwen3-next MTP. Fix attn metadata build bug (vllm-project#26564)
Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com> Signed-off-by: bbartels <benjamin@bartels.dev>
1 parent 7721848 commit afcda4e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

vllm/v1/spec_decode/eagle.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
from vllm.v1.spec_decode.metadata import SpecDecodeMetadata
4242
from vllm.v1.utils import CpuGpuBuffer
4343
from vllm.v1.worker.gpu_input_batch import CachedRequestState, InputBatch
44-
from vllm.v1.worker.ubatching import dbo_current_ubatch_id
4544

4645
logger = init_logger(__name__)
4746

@@ -234,11 +233,11 @@ def propose(
234233

235234
assert self.runner is not None
236235

237-
# FIXME: need to consider multiple kv_cache_groups
238-
ubatch_id = dbo_current_ubatch_id()
239-
attn_metadata_builder = self.runner.attn_groups[0][0].metadata_builders[
240-
ubatch_id
241-
]
236+
if self.attn_metadata_builder is None:
237+
attn_metadata_builder = self._get_attention_metadata_builder()
238+
else:
239+
attn_metadata_builder = self.attn_metadata_builder
240+
242241
attn_metadata = attn_metadata_builder.build_for_drafting(
243242
common_attn_metadata=common_attn_metadata, draft_index=0
244243
)
@@ -1076,7 +1075,7 @@ def dummy_run(
10761075
inputs_embeds=inputs_embeds,
10771076
)
10781077

1079-
def _get_attention_metadata_builder(self) -> list[AttentionMetadataBuilder]:
1078+
def _get_attention_metadata_builder(self) -> AttentionMetadataBuilder:
10801079
"""Find and return the attention metadata builders for EAGLE layers.
10811080
10821081
Returns:

0 commit comments

Comments
 (0)