only do output_past=True for language generation in bart

This commit is contained in:
Patrick von Platen committed 2020-03-11 11:06:56 +01:00
1 parent 7cba11fb9b
commit aceb3fbaf4
2 files changed
+3 -2

No files matched your search

+3
View File
@@ -628,6 +628,9 @@ class ModelTesterMixin:
"input_ids", None
) # TODO (PVP): ugly workaround to make code work for t5 for the moment - has to changed when t5 is fixed.
if self.is_encoder_decoder:
config.output_past = True # needed for Bart TODO: might have to update for other encoder-decoder models
for model_class in self.all_generative_model_classes:
model = model_class(config)
model.to(torch_device)