[ROCm][Perf][DSv4.1] Mono decode on every backbone layer (#61082)
Signed-off-by: Fangzhou Ai <fangzhou.ai@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f47792af7f
commit
cc2a6eea1a
@@ -282,7 +282,17 @@ class DeepseekV4DecoderLayer(nn.Module):
|
||||
engram_mask: torch.Tensor | None = None,
|
||||
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
|
||||
if self.mono is not None:
|
||||
out = self.mono(self, x, positions, residual, post_mix, res_mix, pre_mix)
|
||||
out = self.mono(
|
||||
self,
|
||||
x,
|
||||
positions,
|
||||
residual,
|
||||
post_mix,
|
||||
res_mix,
|
||||
pre_mix,
|
||||
engram_hashes,
|
||||
engram_mask,
|
||||
)
|
||||
if out is not None:
|
||||
return out
|
||||
# Layer 0's attention seam projects the 2-D embedding with the folded
|
||||
|
||||
Reference in New Issue
Block a user