add missing function to FairseqLanguageModel
Summary: In sequence_generator began calling `model.forward_decoder`, but not all decoder models were given an implementation of that function.
@@ -369,6 +369,9 @@ class FairseqLanguageModel(BaseFairseqModel):
"""
return self.decoder(src_tokens, **kwargs)
+ def forward_decoder(self, prev_output_tokens, **kwargs):
+ return self.decoder(prev_output_tokens, **kwargs)
+
def extract_features(self, src_tokens, **kwargs):
"""
Similar to *forward* but only return features.
