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