Write unit tests for causal masking (no token may attend to the future)

Research Engineering & Debugging3 / 8

Chapter 253 / 8

Research Engineering & Debugging

Write unit tests for causal masking (no token may attend to the future)

Medium
Target interface
test_causal_no_future_leak(model, vocab=100, T=8, seed=0)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.