MCPcopy Create free account
hub / github.com/GeWu-Lab/AnyTouch2 / cross_attn_residual_func

Method cross_attn_residual_func

model/layers/decoder_block.py:108–109  ·  view source on GitHub ↗
(q: Tensor, kv: Tensor)

Source from the content-addressed store, hash-verified

106 return self.ls1(self.self_attn(self.norm1(q)))
107
108 def cross_attn_residual_func(q: Tensor, kv: Tensor) -> Tensor:
109 return self.ls2(self.cross_attn(self.q_norm2(q), self.kv_norm2(kv)))
110
111 def ffn_residual_func(q: Tensor) -> Tensor:
112 return self.ls3(self.mlp(self.norm3(q)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected