[examples] summarization/bart/finetune.py supports t5 (#3824)

renames `run_bart_sum.py` to `finetune.py`
This commit is contained in:
Sam Shleifer
2020-04-16 15:15:19 -04:00
committed by GitHub
parent 0cec4fab7d
commit f0c96fafd1
5 changed files with 36 additions and 14 deletions

View File

@@ -15,7 +15,7 @@ wc -l cnn_articles_input_data.txt # should print 11490
wc -l cnn_articles_reference_summaries.txt # should print 11490
```
### Usage
### Generating Summaries
To create summaries for each article in dataset, run:
```bash
@@ -23,3 +23,7 @@ python evaluate_cnn.py cnn_articles_input_data.txt cnn_generated_articles_summar
```
The default batch size, 8, fits in 16GB GPU memory, but may need to be adjusted to fit your system.
The rouge scores "rouge1, rouge2, rougeL" are automatically created and saved in ``rouge_score.txt``.
### Finetuning
Pass model_type=t5 and model `examples/summarization/bart/finetune.py`