LongTensor([examples[i][k] for i in range(len(examples))]) for k, v in examples[0].items()} ) batch["labels"] = batch["input_ids"].clone() batch["decoder_input_ids"] = shift_tokens_right( batch["labels"], self.tokenizer.pad_token_id, self.decoder_start_token_id ) batch[...