src/transformers/models/big_bird/modeling_big_bird.py/BigBirdForQuestionAnswering/prepare_question_mask
class BigBirdForQuestionAnswering:    def prepare_question_mask(q_lengths: torch.Tensor, maxlen: int):
        # q_lengths -> (bz, 1)
        mask = torch.arange(0, maxlen).to(q_lengths.device)
        mask.unsqueeze_(0)  # -> (1, maxlen)
        mask = mask < q_lengths
        return mask