Can we batch inputs to the decoder in seq2seq model?

I am facing a problem while feeding data to Decoder using batch when there is variable length of sequence.
I can deal with the encoder using packing. the problem occurs in this following condition-

``````encoder([[4 5 6] [4 5 6] [4 5 6]]))--------decoder([[7 7 7]])
encoder([[1 2 3] [1 2 3]])-----------------decoder([[3 3 3] [3 3 3] [3 3 3]])
encoder([[9 9 9]])-------------------------decoder([[2 2 2]])
``````

now I can batch encoder side using packing, but then I can’t batch decoder side since the order is non decreasing. Is it possible to do it in any efficient way?