Self-Attention Mechanism Visualization
Interactive visualization of self-attention in Transformers. Explore and understand how self-attention works in neural nets.
Self-Attention Mechanism Visualization
Step-by-Step Calculation
Matrix Q is empty
Matrix K is empty
Matrix V is empty
Step 1: Calculate QK^T
QKT=QcdotKT Matrix QK^T is empty
Step 2: Scale QK^T
extScaledQKT=\racQKTdk Matrix Scaled QK^T is empty
Step 3: Apply Softmax
extAttentionScores= extsoftmax( extScaledQKT) Matrix Attention Scores is empty
Step 4: Multiply with V
extOutput= extAttentionScores⋅V Matrix Output is empty
Created with <3 by Jaber Jaber