The way to get Seq2SeqLM's `decoder_input_ids` to obtain `past_key_values`
Sorry for the daily questions.I’m working onSeq2SeqLMand thanks to the advice I’ve gotten on this forum, I’m able to move forward with understanding and implementation. Thank you so much!Now, I would like to getpast(or,past_key_values) inSeq2SeqLMas well asCausalLM.huggingface.coModel outputsWe’re on a journey to advance and democratize artificial intelligence through open source and open science.past_key_values (List[torch.FloatTensor], optional, returned when use_cache=True is passed or when config.use_cache=True) –  List of torch.FloatTensor of length config.n_layers, with each tensor of shape (2, batch_size, num_heads, sequence_length, embed_size_per_head)).  Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be used (see past_key_values input) to speed up sequential decoding.At first, I was having trouble gettingpast_key_valueseven though I confirmuse_cache = true, but then I read theclass BartModel’s implementation offorwardand realized I needdecoder_input_idsfor inputs.if decoder_input_ids is None:
            use_cache = FalseNow I am wondering how to get thedecoder_input_idsinSeq2seqLM.I interpret as follows:CausalLMobtainspast_key_valuesusing the given context (or, prompt) and the output that comes from it in turn.So how doesSeq2SeqLMget thedecoder_input_idswhen it sequentially generates tokens with the given context after processing it with encoder?Thank you in advance.yusukemori