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

Correctness, Debugging, and Performance Experiments3 / 8

Chapter 263 / 8

Correctness, Debugging, and Performance Experiments

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)

Complete the starter code in the editor. Any correct approach is accepted.

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