[Model Runner V2] support mamba hybrid models align prefix cache (#42406)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
This commit is contained in:
zhrrr
2026-06-29 14:09:16 -07:00
committed by GitHub
parent a309d4fe60
commit 61ab70ec3b
9 changed files with 1046 additions and 133 deletions
@@ -973,7 +973,9 @@ class DiffusionGemmaModelState(ModelState):
# so the captured graph and runtime point to identical addresses.
return {"inputs_embeds": self._inputs_embeds_buf[:num_tokens]}
def postprocess_state(self, idx_mapping, num_sampled) -> None:
def postprocess_state(
self, idx_mapping, num_sampled, num_computed_tokens=None
) -> None:
return None
def prepare_attn(