chore(transformer-xl): Initial commit
This commit is contained in:
parent
ef4684ef39
commit
10512876f2
46 changed files with 10547 additions and 0 deletions
42
transformer-xl/pytorch/run_wt103_base.sh
Normal file
42
transformer-xl/pytorch/run_wt103_base.sh
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $1 == 'train' ]]; then
|
||||
echo 'Run training...'
|
||||
python train.py \
|
||||
--cuda \
|
||||
--data ../data/wikitext-103/ \
|
||||
--dataset wt103 \
|
||||
--adaptive \
|
||||
--n_layer 16 \
|
||||
--d_model 410 \
|
||||
--n_head 10 \
|
||||
--d_head 41 \
|
||||
--d_inner 2100 \
|
||||
--dropout 0.1 \
|
||||
--dropatt 0.0 \
|
||||
--optim adam \
|
||||
--lr 0.00025 \
|
||||
--warmup_step 0 \
|
||||
--max_step 200000 \
|
||||
--tgt_len 150 \
|
||||
--mem_len 150 \
|
||||
--eval_tgt_len 150 \
|
||||
--batch_size 60 \
|
||||
--multi_gpu \
|
||||
--gpu0_bsz 4 \
|
||||
${@:2}
|
||||
elif [[ $1 == 'eval' ]]; then
|
||||
echo 'Run evaluation...'
|
||||
python eval.py \
|
||||
--cuda \
|
||||
--data ../data/wikitext-103/ \
|
||||
--dataset wt103 \
|
||||
--tgt_len 64 \
|
||||
--mem_len 640 \
|
||||
--clamp_len 400 \
|
||||
--same_length \
|
||||
--split test \
|
||||
${@:2}
|
||||
else
|
||||
echo 'unknown argment 1'
|
||||
fi
|
||||
Reference in a new issue