Exercises / transformers
Causal mask
mask_scores(scores, i) sets scores[j] to -1e9 when j > i. Print the masked row for i=1 on [0.5, 0.5, 0.5].
Live Pythonpython
Output
Run to execute this in your browser. Nothing is sent to a server.
Exercises / transformers
mask_scores(scores, i) sets scores[j] to -1e9 when j > i. Print the masked row for i=1 on [0.5, 0.5, 0.5].
Run to execute this in your browser. Nothing is sent to a server.