mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-05 22:00:09 +06:00

* Reorganize example folder * Continue reorganization * Change requirements for tests * Final cleanup * Finish regroup with tests all passing * Copyright * Requirements and readme * Make a full link for the documentation * Address review comments * Apply suggestions from code review Co-authored-by: Lysandre Debut <lysandre@huggingface.co> * Add symlink * Reorg again * Apply suggestions from code review Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com> * Adapt title * Update to new strucutre * Remove test * Update READMEs Co-authored-by: Lysandre Debut <lysandre@huggingface.co> Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com>
25 lines
649 B
Bash
Executable File
25 lines
649 B
Bash
Executable File
#!/usr/bin/env bash
|
|
export PYTHONPATH="../":"${PYTHONPATH}"
|
|
|
|
export BS=32
|
|
export GAS=1
|
|
|
|
python finetune.py \
|
|
--learning_rate=3e-5 \
|
|
--fp16 \
|
|
--gpus 1 \
|
|
--do_train \
|
|
--do_predict \
|
|
--val_check_interval 0.25 \
|
|
--n_val 500 \
|
|
--num_train_epochs 2 \
|
|
--freeze_encoder --freeze_embeds --data_dir cnn_dm \
|
|
--max_target_length 142 --val_max_target_length=142 \
|
|
--train_batch_size=$BS --eval_batch_size=$BS --gradient_accumulation_steps=$GAS \
|
|
--model_name_or_path sshleifer/student_cnn_12_6 \
|
|
--tokenizer_name facebook/bart-large \
|
|
--warmup_steps 500 \
|
|
--output_dir distilbart-cnn-12-6 \
|
|
"$@"
|
|
|