-
Notifications
You must be signed in to change notification settings - Fork 206
/
ft_mass_enzh.sh
44 lines (40 loc) · 1.4 KB
/
ft_mass_enzh.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
data_dir=data/processed
save_dir=checkpoints/mass/fine-tune
user_dir=mass
model=zhen_mass_pre-training.pt
seed=1234
max_tokens=2048
update_freq=1
dropout=0.1
attention_heads=16
embed_dim=1024
ffn_embed_dim=4096
encoder_layers=10
decoder_layers=6
mkdir -p $save_dir
fairseq-train $data_dir \
--user-dir $user_dir \
--save-dir $save_dir \
--task xmasked_seq2seq \
--source-langs zh --target-langs en \
--langs en,zh \
--arch xtransformer \
--mt_steps zh-en \
--optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 \
--lr-scheduler inverse_sqrt --lr 0.00005 --min-lr 1e-09 \
--criterion label_smoothed_cross_entropy \
--lm-bias --lazy-load --seed ${seed} \
--log-format json \
--max-tokens ${max_tokens} --update-freq ${update_freq} \
--encoder-normalize-before --decoder-normalize-before \
--dropout ${dropout} --relu-dropout 0.1 --attention-dropout 0.1 \
--decoder-attention-heads ${attention_heads} --encoder-attention-heads ${attention_heads} \
--decoder-embed-dim ${embed_dim} --encoder-embed-dim ${embed_dim} \
--decoder-ffn-embed-dim ${ffn_embed_dim} --encoder-ffn-embed-dim ${ffn_embed_dim} \
--encoder-layers ${encoder_layers} --decoder-layers ${decoder_layers} \
--max-update 1000000 --max-epoch 50 \
--keep-interval-updates 100 --save-interval-updates 3000 --log-interval 50 \
--share-decoder-input-output-embed \
--valid-lang-pairs zh-en \
--reload-checkpoint $model \
--ddp-backend=no_c10d