[Model][V1] Support Ernie MTP (#22169)

Signed-off-by: zhouchong <zhouchong03@baidu.com>
Co-authored-by: zhouchong <zhouchong03@baidu.com>
This commit is contained in:
xyxinyang
2025-08-20 20:41:55 +08:00
committed by GitHub
parent 50df09fe13
commit 7cd17e22d7
6 changed files with 320 additions and 7 deletions

View File

@@ -194,7 +194,7 @@ class EagleProposer:
hidden_states=self.hidden_states[:num_input_tokens],
inputs_embeds=inputs_embeds,
)
if self.method == "deepseek_mtp":
if self.method in ("deepseek_mtp", "ernie_mtp"):
last_hidden_states = ret_hidden_states
else:
last_hidden_states, hidden_states = ret_hidden_states