forked from microsoft/BioGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.sh
21 lines (19 loc) · 872 Bytes
/
train.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
SAVE_DIR=../../checkpoints/RE-DDI-BioGPT
mkdir -p ${SAVE_DIR}
fairseq-train \
../../data/DDI/relis-bin --save-dir ${SAVE_DIR} \
--user-dir ../../src \
--finetune-from-model ../../checkpoints/Pre-trained-BioGPT/checkpoint.pt \
--task language_modeling_prompt \
--arch transformer_lm_prompt_biogpt \
--share-decoder-input-output-embed --decoder-learned-pos \
--optimizer adam --adam-betas '(0.9, 0.98)' \
--weight-decay 0.01 --clip-norm 0.0 \
--lr 1e-4 --lr-scheduler inverse_sqrt --warmup-updates 500 --warmup-init-lr 1e-07 \
--tokens-per-sample 1024 --max-source-positions 640 --max-target-positions 1024 \
--max-tokens 1024 --update-freq 32 \
--skip-invalid-size-inputs-valid-test \
--max-epoch 100 --keep-last-epochs 5 \
--learned-prompt 9