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

        Input:
            I1, I2, ..., IN, 0, 0, 0
        Output:
            BOS, I1, I2, ..., IN, EOS, PAD, PAD, PAD
        """
        input_ids = (
            input_ids + self.output_vocab_size
        ) * input_mask  # This is just for Llama, since it uses a unified codebook for both input and output

        input_ids = F.pad(input_ids, (0, 1), value=0) + eos_id * F.pad(
            1 - input_mask, (0, 1), value=1
        )  # make pad token eos token, add eos token at the end
        input_mask = F.pad(input_mask, (1, 0), value=1)  # add eos mask

        input_ids = input_ids * input_mask + pad_id * (
            1 - input_mask
        )  # restore pad token ids
        input_ids = F.pad(input_ids, (1, 0), value=bos_id)  # add bos token
        input_mask = F.pad(input_mask, (1, 0), value=1)  # add bos mask
        input_label = self.no_loss_label * torch.ones_like(
            input_ids
        )  # loss for entire phone is not computed (passed to llama)

        return input_ids.long(), input_mask.long(), input_label.long()
Args:
input_ids: [B, T]
input_mask: [B, T], whose value is 1 for valid token and 0 for pad token
Returns:
input_ids: [B, T+2]
input_mask: [B, T+2], whose value is 1 for valid token and 0 for pad token
input_label: [B, T+2], whose value is -100 for not computing loss

Input:
I1, I2, ..., IN, 0, 0, 0
Output:
BOS, I1, I2, ..., IN, EOS, PAD, PAD, PAD
models/vc/autoregressive_transformer/ar_model.py