[Feature] Support MTP speculative decoding for Bailing hybrid models (#44880)

Signed-off-by: zc02384840 <zc02384840@antgroup.com>
Co-authored-by: zc02384840 <zc02384840@antgroup.com>
This commit is contained in:
alex101-ops
2026-07-06 10:38:50 +08:00
committed by GitHub
co-authored by zc02384840
parent 95a248faed
commit f2aaf59151
11 changed files with 1200 additions and 6 deletions
@@ -533,6 +533,10 @@ class BailingMoeV25Model(nn.Module):
def embed_input_ids(self, input_ids: torch.Tensor) -> torch.Tensor:
return self.word_embeddings(input_ids)
@property
def embed_tokens(self) -> nn.Module:
return self.word_embeddings
def forward(
self,
input_ids: torch.Tensor | None,