[spec decode] Consolidate speculative decode method name for MTP (#25232)
Signed-off-by: zixi-qi <qizixi@meta.com>
This commit is contained in:
@@ -222,8 +222,7 @@ class EagleProposer:
|
||||
hidden_states=self.hidden_states[:num_input_tokens],
|
||||
inputs_embeds=inputs_embeds,
|
||||
)
|
||||
if self.method in ("deepseek_mtp", "ernie_mtp", "qwen3_next_mtp",
|
||||
"longcat_flash_mtp"):
|
||||
if self.method == "mtp":
|
||||
last_hidden_states = ret_hidden_states
|
||||
hidden_states = last_hidden_states
|
||||
else:
|
||||
@@ -352,8 +351,7 @@ class EagleProposer:
|
||||
hidden_states=self.hidden_states[:input_batch_size],
|
||||
inputs_embeds=inputs_embeds,
|
||||
)
|
||||
if self.method in ("deepseek_mtp", "ernie_mtp",
|
||||
"qwen3_next_mtp", "longcat_flash_mtp"):
|
||||
if self.method == "mtp":
|
||||
last_hidden_states = ret_hidden_states
|
||||
hidden_states = ret_hidden_states
|
||||
else:
|
||||
@@ -888,10 +886,10 @@ class EagleProposer:
|
||||
def _get_attention_metadata_builder(
|
||||
self) -> list[AttentionMetadataBuilder]:
|
||||
"""Find and return the attention metadata builders for EAGLE layers.
|
||||
|
||||
|
||||
Returns:
|
||||
The metadata builders for EAGLE layers.
|
||||
|
||||
|
||||
Raises:
|
||||
AssertionError: If no metadata builders are found for EAGLE layers.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user