Why do we set input_ids = decoder_input_ids in beam search?

Pretty much the title. Here’s the reference to the code

I wanted to generate text using beam search when I have inputs_embeds, attention_mask, decoder_input_ids and decoder_attention_mask

Why is that code setting input_ids using decoder_input_ids, I also see no way to stop it from doing that. If there isn’t any way, can anyone please link a resource that shows how to do conditional generation (I’m using BART model) when I have the above parameters ? (inputs_embeds, attention_mask, decoder_input_ids and decoder_attention_mask)