def METHOD_NAME(self, tokens, ignore_pad_token_for_loss=False):
    tokens = tokens.cpu().numpy()
    if ignore_pad_token_for_loss:
        tokens = np.where(tokens != -100, tokens,
                          self.tokenizer.pad_token_id)
    tokens = np.where(tokens < self.tokenizer.vocab_size, tokens,
                      self.tokenizer.pad_token_id)
    return [
        t for t in self.tokenizer.batch_decode(
            tokens, skip_special_tokens=True) if t != '</s>'
    ]