forked from facebookresearch/fairseq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmp.txt
56 lines (47 loc) · 1.78 KB
/
tmp.txt
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
45
46
47
48
49
50
51
52
53
54
55
56
FAIRSEQ_PATH=~/fairseq
CHECKPOINTS=checkpoints/levt
DATASET=data-bin/joint-bpe-37k
python3 train.py \
--save-dir $CHECKPOINTS \
--ddp-backend=no_c10d \
--task translation_lev \
--criterion nat_loss \
--arch levenshtein_transformer \
--noise random_delete \
--share-all-embeddings \
--optimizer adam --adam-betas '(0.9,0.98)' \
--lr 0.0005 --lr-scheduler inverse_sqrt \
--min-lr '1e-09' --warmup-updates 10000 \
--warmup-init-lr '1e-07' --label-smoothing 0.1 \
--dropout 0.3 --weight-decay 0.01 \
--decoder-learned-pos \
--encoder-learned-pos \
--apply-bert-init \
--log-format 'simple' --log-interval 100 \
--fixed-validation-seed 7 \
--max-tokens 500 \
--save-interval-updates 5000 \
--max-update 300000 \
$DATASET
python3 train.py \
$DATASET \
--arch transformer --share-decoder-input-output-embed \
--optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 \
--lr 5e-4 --lr-scheduler inverse_sqrt --warmup-updates 4000 \
--dropout 0.3 --weight-decay 0.0001 \
--criterion label_smoothed_cross_entropy --label-smoothing 0.1 \
--max-tokens 8182 --fp16
cat gec.src gec.trg | python subword-nmt/learn_bpe.py -s 8000 -o bpecodes
python subword-nmt/apply_bpe.py -c bpecodes <gec.src> gec.src.bpe
python3 train.py \
data-bin/gec \
--arch transformer_vaswani_wmt_en_de_big --share-all-embeddings \
--save-dir checkpoints/err_generator \
--optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 \
--lr 0.0005 --lr-scheduler inverse_sqrt --warmup-updates 4000 --warmup-init-lr 1e-07 \
--dropout 0.3 --weight-decay 0.0 \
--criterion label_smoothed_cross_entropy --label-smoothing 0.1 \
--max-update 100000 \
--max-tokens 8000 \
--fp16 \
--keep-last-epochs 2