[Bart] Replace config.output_past with use_cache kwarg (#3632)

This commit is contained in:
Sam Shleifer authored and GitHub committed 2020-04-07 19:08:26 -04:00
1 parent e344e3d402
commit 715aa5b135
4 files changed
+25 -26

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ def generate_summaries(
examples: list, out_file: str, model_name: str, batch_size: int = 8, device: str = DEFAULT_DEVICE
):
fout = Path(out_file).open("w")
model = BartForConditionalGeneration.from_pretrained(model_name, output_past=True,).to(device)
model = BartForConditionalGeneration.from_pretrained(model_name).to(device)
tokenizer = BartTokenizer.from_pretrained("bart-large")
max_length = 140