BART for summarization training with CNN/DM using pytorch-lightning

This commit is contained in:
Andre Carrera
2020-03-24 19:00:24 -06:00
committed by GitHub
parent eaabaaf750
commit 3d76df3a12
5 changed files with 252 additions and 2 deletions

View File

@@ -14,6 +14,19 @@ python evaluate_cnn.py <path_to_test.source> cnn_test_summaries.txt
```
the default batch size, 8, fits in 16GB GPU memory, but may need to be adjusted to fit your system.
### Training
After downloading the CNN and Daily Mail datasets, preprocess the dataset:
```commandline
git clone https://github.com/artmatsak/cnn-dailymail
cd cnn-dailymail && python make_datafiles.py ../cnn/stories/ ../dailymail/stories/
```
Run the training script: `run_train.sh`
### Where is the code?
The core model is in `src/transformers/modeling_bart.py`. This directory only contains examples.