Fix non-causal MLA attention when no 4D mask is passed
Burak Aydın
0931c91
The MLA layers always call eager_attention_forward, which only applied a
mask it was given. Under the default sdpa mode (unpadded input, no cache)
and under flash_attention_2 the model passes no 4D mask, so these layers
attended to future tokens, and a 2D padding mask raised an IndexError.
eager_attention_forward now builds the causal mask itself (offset by the
cached keys) when it gets no 4D mask, and applies a 2D padding mask. The
4D-mask path and one-token decode are unchanged.
Fixes #15.