Cross Attention in Decoder Block of Transformer
Notice where the cross attention is marked, 2 arrows are coming from encoder block, and one is coming from decoder block.
Why do we need to consider Encoder Block?
Ofc, first 2 words of decoder block, and original sentence context from the Encoder block.
So, we need to figure out the relationship between these two.
How will we get the relationship?
q : Hindi (from Decoder Block)
k : Eng (from Encoder Block)
v : Eng (from Encoder Block)
Comments
Post a Comment