[generate] do_sample default back to False (#3298)

* change do_samples back

* None better default as boolean

* adapt do_sample to True in test example

* make style
This commit is contained in:
Patrick von Platen authored and GitHub committed 2020-03-17 10:52:37 -04:00
1 parent 2187c49f5c
commit e8f44af5bf
6 files changed
+30 -22

No files matched your search

@@ -35,7 +35,6 @@ def generate_summaries(lns, out_file, batch_size=8, device=DEFAULT_DEVICE):
min_length=min_length + 1, # +1 from original because we start at step=1
no_repeat_ngram_size=3,
early_stopping=True,
do_sample=False,
decoder_start_token_id=model.config.eos_token_ids[0],
)
dec = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=False) for g in summaries]