@yjernite is also interested in this line of work.
I would write a method similar to parlai’s decode_forced 15
that forces the model to decode the tgt sequence and estimates its probability, then backprob the sum of the GT sequence. I’m not sure if that will lead to super similar results to the current teacher-forcing training approach, but it would be interesting to test!