mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-30 00:17:20 +08:00
[BUG] Qwen3-next MTP. Fix attn metadata build bug (#26564)
Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com>
This commit is contained in:
parent
7c12763b24
commit
e94cfd51da
@ -41,7 +41,6 @@ from vllm.v1.sample.metadata import SamplingMetadata
|
|||||||
from vllm.v1.spec_decode.metadata import SpecDecodeMetadata
|
from vllm.v1.spec_decode.metadata import SpecDecodeMetadata
|
||||||
from vllm.v1.utils import CpuGpuBuffer
|
from vllm.v1.utils import CpuGpuBuffer
|
||||||
from vllm.v1.worker.gpu_input_batch import CachedRequestState, InputBatch
|
from vllm.v1.worker.gpu_input_batch import CachedRequestState, InputBatch
|
||||||
from vllm.v1.worker.ubatching import dbo_current_ubatch_id
|
|
||||||
|
|
||||||
logger = init_logger(__name__)
|
logger = init_logger(__name__)
|
||||||
|
|
||||||
@ -234,11 +233,11 @@ class EagleProposer:
|
|||||||
|
|
||||||
assert self.runner is not None
|
assert self.runner is not None
|
||||||
|
|
||||||
# FIXME: need to consider multiple kv_cache_groups
|
if self.attn_metadata_builder is None:
|
||||||
ubatch_id = dbo_current_ubatch_id()
|
attn_metadata_builder = self._get_attention_metadata_builder()
|
||||||
attn_metadata_builder = self.runner.attn_groups[0][0].metadata_builders[
|
else:
|
||||||
ubatch_id
|
attn_metadata_builder = self.attn_metadata_builder
|
||||||
]
|
|
||||||
attn_metadata = attn_metadata_builder.build_for_drafting(
|
attn_metadata = attn_metadata_builder.build_for_drafting(
|
||||||
common_attn_metadata=common_attn_metadata, draft_index=0
|
common_attn_metadata=common_attn_metadata, draft_index=0
|
||||||
)
|
)
|
||||||
@ -1076,7 +1075,7 @@ class EagleProposer:
|
|||||||
inputs_embeds=inputs_embeds,
|
inputs_embeds=inputs_embeds,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _get_attention_metadata_builder(self) -> list[AttentionMetadataBuilder]:
|
def _get_attention_metadata_builder(self) -> AttentionMetadataBuilder:
|
||||||
"""Find and return the attention metadata builders for EAGLE layers.
|
"""Find and return the attention metadata builders for EAGLE layers.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user