The padded-batch training mask over L positions: [B, 1, L, L] bool, true
where query i of row b may attend key j:
(j <= i) AND (j < lengths[b]) [AND (i < j + window) under a sliding window]
createCausalMask(L, 0, window) broadcast over the rows and masked by each
row's key validity. Caller owns the result.
The padded-batch training mask (
paddedTrainingMask): [B, 1, L, L] bool, causal (withinwindowSize) AND key within its row's valid length. Caller owns the result.