mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 02:53:41 +08:00
Pass ln2 to cross attention
This commit is contained in:
parent
e899271275
commit
64e53e8415
2
t5/t5.py
2
t5/t5.py
@ -210,7 +210,7 @@ class TransformerDecoderLayer(nn.Module):
|
|||||||
x = x + y
|
x = x + y
|
||||||
|
|
||||||
y = self.ln2(x)
|
y = self.ln2(x)
|
||||||
y, _ = self.cross_attention(x, memory, memory, memory_mask)
|
y, _ = self.cross_attention(y, memory, memory, memory_mask)
|
||||||
x = x + y
|
x = x + y
|
||||||
|
|
||||||
y = self.ln3(x)
|
y = self.ln3(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user