    def padding_for_output(self, output_ids, output_mask, eos_id, bos_id, pad_id):
        """
        Args:
            output_ids: [B, T]
            output_mask: [B, T], whose value is 1 for valid token and 0 for pad token
        Returns:
            output_ids: [B, T+2]
            output_mask: [B, T+2], whose value is 1 for valid token and 0 for pad token
            output_label: [B, T+2], whose value is -100 for not computing loss

        Input:
            O1, O2, ..., ON, 0, 0, 0
        Output:
            BOS, O1, O2, ..., ON, EOS, PAD, PAD, PAD
        """
        output_ids = output_ids * output_mask
        output_ids = F.pad(output_ids, (0, 1), value=0) + eos_id * F.pad(
            1 - output_mask, (0, 1), value=1
        )
        output_mask = F.pad(output_mask, (1, 0), value=1)
        output_ids = output_ids * output_mask + pad_id * (1 - output_mask)
        output_ids = F.pad(output_ids, (1, 0), value=bos_id)
        output_mask = F.pad(output_mask, (1, 0), value=1)
        output_label = output_ids * output_mask + self.no_loss_label * (
            1 - output_mask
        )  # loss for target is computed on unmasked tokens
        return output_ids.long(), output_mask.long(), output_label.long()
Args:
output_ids: [B, T]
output_mask: [B, T], whose value is 1 for valid token and 0 for pad token
Returns:
output_ids: [B, T+2]
output_mask: [B, T+2], whose value is 1 for valid token and 0 for pad token
output_label: [B, T+2], whose value is -100 for not computing loss

Input:
O1, O2, ..., ON, 0, 0, 0
Output:
BOS, O1, O2, ..., ON, EOS, PAD, PAD, PAD
models/vc/autoregressive_transformer/ar_model.py