mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-20 21:18:21 +06:00
23 lines
606 B
Bash
Executable File
23 lines
606 B
Bash
Executable File
# Install newest ptl.
|
|
pip install -U git+http://github.com/PyTorchLightning/pytorch-lightning/
|
|
|
|
|
|
export OUTPUT_DIR_NAME=bart_sum
|
|
export CURRENT_DIR=${PWD}
|
|
export OUTPUT_DIR=${CURRENT_DIR}/${OUTPUT_DIR_NAME}
|
|
|
|
# Make output directory if it doesn't exist
|
|
mkdir -p $OUTPUT_DIR
|
|
|
|
# Add parent directory to python path to access transformer_base.py
|
|
export PYTHONPATH="../../":"${PYTHONPATH}"
|
|
|
|
python run_bart_sum.py \
|
|
--data_dir=./cnn-dailymail/cnn_dm \
|
|
--model_type=bart \
|
|
--model_name_or_path=bart-large \
|
|
--learning_rate=3e-5 \
|
|
--train_batch_size=4 \
|
|
--eval_batch_size=4 \
|
|
--output_dir=$OUTPUT_DIR \
|
|
--do_train |