[s2s] use --eval_beams command line arg (#6926)

This commit is contained in:
Sam Shleifer 2020-09-03 12:42:09 -04:00 committed by GitHub
parent 0f360d3d1c
commit 207ed8cb78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,6 +202,7 @@ class SummarizationModule(BaseTransformer):
attention_mask=batch["attention_mask"],
use_cache=True,
decoder_start_token_id=self.decoder_start_token_id,
num_beams=self.eval_beams,
)
gen_time = (time.time() - t0) / batch["input_ids"].shape[0]
preds: List[str] = self.ids_to_clean_text(generated_ids)