Open
Description
Hi, I want to use FlexAttention for alibi with padding(no bias)
If seq_len is 5 I want to make alibi tensor like below, which is alibi tensor with seq_len, and last item is not penalized
0 -1 -2 -3 0
-1 0 -1 -2 0
-2 -1 0 -1 0
-3 -2 -1 0 0
0 0 0 0 0
How can I implement score mod like this? seq_len can be different every forward. Such alibi is used in Voicebox paper. I'm new to BatchedTensor or maybe vmap API? I do not know how to implement it at all. Can you help me?
Metadata
Metadata
Assignees
Labels
No labels