Commit ab42136f by xuchen

yaml and shell

parent cb2f2bcb
arch: s2t_ctc
encoder-type: pds
pds-ctc: 0_0_1_1_1_1
share-inter-ctc: True
encoder-embed-dim: 256
#pds-stages: 16
#pds-layers: 3_4_4
#pds-ratios: 2_2_2
pds-stages: 32
pds-layers: 3_3_1_1_1_1_1_1_1_1_1_1
pds-ratios: 2_2_0_0_0_2_0_0_0_0_0_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: ctc
zero_infinity: True
ctc-weight: 1.0
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 24
encoder-attention-heads: 4
#load-pretrained-encoder-from:
arch: s2t_ctc
encoder-type: pds
pds-ctc: 0_0_1_1_1_1
share-inter-ctc: True
encoder-embed-dim: 256
#pds-stages: 16
#pds-layers: 3_4_4
#pds-ratios: 2_2_2
pds-stages: 20
pds-layers: 3_3_1_1_1_1
pds-ratios: 2_2_0_0_0_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: ctc
zero_infinity: True
ctc-weight: 1.0
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 24
encoder-attention-heads: 4
#load-pretrained-encoder-from:
......@@ -5,11 +5,7 @@ gpu_num=1
data_tag=asr
#data_tag=asr_joint_lcrm_niu
test_subset=(dev-clean dev-other test-clean test-other all)
test_subset=(dev-clean dev-other test-clean test-other)
#test_subset=(train-clean-50)
#test_subset=(dev-clean)
#test_subset=(dev-other)
#test_subset=(train-clean-5k-sort)
#test_subset=(dev-clean dev-other test-clean test-other)
exp_name=
if [ "$#" -eq 1 ]; then
......@@ -18,11 +14,11 @@ fi
ctc_infer=0
n_average=10
beam_size=1
beam_size=5
infer_ctc_weight=0
len_penalty=1.0
max_tokens=50000
batch_size=1
batch_size=0
infer_debug=0
dec_model=checkpoint_best.pt
......
dir=early_exit/purectc_pds_base_8_ee_conformer_layer36_interw1_x2_256_ds0_pdrop0_334
vocab=256
#dir=early_exit/purectc_pds_base_8_ee_conformer_layer36_interw1_x2_4k_ds0_pdrop0_334
#vocab=4k
data=config_${vocab}.yaml
./run.sh --stage 2 --data_config ${data} --exp_name $dir
#./run.sh --stage 2 --data_config ${data} --exp_name $dir --infer_tag ee4 --infer_parameter "--early-exit-count 4"
#./run.sh --stage 2 --data_config ${data} --exp_name $dir --infer_tag ee6 --infer_parameter "--early-exit-count 6"
#./run.sh --stage 2 --data_config ${data} --exp_name $dir --infer_tag ee8 --infer_parameter "--early-exit-count 8"
#./run.sh --stage 2 --data_config ${data} --exp_name $dir --infer_tag ee10 --infer_parameter "--early-exit-count 10"
......@@ -85,8 +85,8 @@ infer_debug=0
infer_score=0
infer_tag=
infer_parameter=
infer_tag=ee6
infer_parameter="--early-exit-count 6"
#infer_tag=ee3
#infer_parameter="--early-exit-count 3"
#infer_parameter="--early-exit-layer 12"
#infer_parameter="--cal-monotonic-cross-attn-weights --cal-localness --localness-window 0.1 --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
......
......@@ -14,7 +14,7 @@ cer=0
ctc_infer=0
n_average=10
beam_size=5
infer_ctc_weight=0.1
infer_ctc_weight=0
len_penalty=1.0
max_tokens=50000
batch_size=1
......
train-subset: train_mix_1,train_mix_2
valid-subset: dev_en,dev_en2de
train-subset: train_mix_1,train_mix_2,train_mix_3,train_mix_4
#valid-subset: dev_en,dev_en2de
valid-subset: dev_en2de
ignore-prefix-size: 1
use-additional-ctc-text: true
sharded-data-load: true
......@@ -9,19 +10,20 @@ max-update: 300000
patience: 20
post-process: sentencepiece
best_checkpoint_metric: loss
maximize_best_checkpoint_metric: False
#best_checkpoint_metric: loss
#maximize_best_checkpoint_metric: False
#eval-bleu: True
eval-bleu: True
eval-bleu-args: {"beam": 5, "lenpen": 1.0, "prefix_size": 1}
eval-bleu-detok: moses
eval-bleu-remove-bpe: sentencepiece
eval-bleu-print-samples: True
#best_checkpoint_metric: bleu
#maximize_best_checkpoint_metric: True
best_checkpoint_metric: bleu
#best_checkpoint_metric: accuracy
maximize_best_checkpoint_metric: True
# no-epoch-checkpoints: True
validate-interval: 1
validate-interval: 3
keep-last-epochs: 10
keep-best-checkpoints: 10
......
......@@ -45,21 +45,21 @@ share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
ctc-layer: 12
#xctc-weight: 0.1
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
#inter-xctc-weight: 0.05
#inter-xctc-layers: 16
inter-xctc-weight: 0.05
inter-xctc-layers: 16
# Prediction-aware encoding
ctc-pae: inter_league
#xctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
#xctc-pae-ground-truth-ratio: 0.1
#xctc-pae-ground-truth-only-mistake: True
#pae-oracle-smooth: True
xctc-pae-ground-truth-ratio: 0.1
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
......@@ -3,7 +3,7 @@
gpu_num=1
data_tag=
test_subset=(tst-COMMON_en-de tst-COMMON_en-fr tst-COMMON_en-es tst-COMMON_en-it tst-COMMON_en-nl tst-COMMON_en-pt tst-COMMON_en-ro tst-COMMON_en-ru)
test_subset=(tst-COMMON_en tst-COMMON_en2de)
#test_subset=(tst-COMMON_en-de)
#test_subset=(test_en-fr_1k)
......@@ -13,15 +13,15 @@ if [ "$#" -eq 1 ]; then
fi
sacrebleu=1
ctc_infer=0
ctc_infer=1
n_average=10
beam_size=5
infer_ctc_weight=0
infer_ctc_weight=0.1
len_penalty=1.0
max_tokens=10000
batch_size=0
max_tokens=20000
batch_size=1
infer_debug=0
dec_model=checkpoint_last.pt
dec_model=checkpoint_best.pt
cmd="./run.sh
--stage 2
......
......@@ -23,7 +23,7 @@ if [[ ${tokenizer} -eq 1 ]]; then
fi
echo "SacreBLEU" >> ${record}
cmd="cat ${gen} | sacrebleu ${ref} -m bleu -w 4 -l ${lang_pair}"
cmd="cat ${gen} | sacrebleu ${ref} -m bleu -w 4 -l ${lang_pair} | jq -r .score"
eval $cmd >> ${record}
cat ${record}
rm ${record}
......@@ -83,13 +83,17 @@ bleu_valid=0
batch_size=0
sacrebleu=1
dec_model=checkpoint_best.pt
ctc_infer=0
ctc_infer=1
infer_ctc_weight=0
n_average=10
beam_size=5
len_penalty=1.0
epoch_ensemble=0
best_ensemble=1
infer_debug=0
infer_score=0
infer_tag=
infer_parameter=
#infer_parameters="--cal-monotonic-cross-attn-weights --cal-localness --localness-window 0.1 --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
# Parsing Options
......@@ -266,11 +270,9 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
cp -f ${pwd_dir}/`basename ${BASH_SOURCE[0]}` ${model_dir}
cp -f ${pwd_dir}/train.sh ${model_dir}
extra_parameter="${extra_parameter}
--train-config ${pwd_dir}/conf/basis.yaml"
cp -f ${pwd_dir}/conf/basis.yaml ${model_dir}
train_config=basis,${train_config}
config_list="${train_config//,/ }"
idx=1
idx=0
for config in ${config_list[@]}
do
config_path=${pwd_dir}/conf/${config}.yaml
......@@ -280,8 +282,13 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
fi
cp -f ${config_path} ${model_dir}
if [[ $idx -eq 0 ]]; then
extra_parameter="${extra_parameter}
--train-config ${config_path}"
else
extra_parameter="${extra_parameter}
--train-config${idx} ${config_path}"
fi
idx=$((idx + 1))
done
......@@ -373,20 +380,38 @@ fi
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
echo "Stage 2: Decoding"
dec_models=
if [[ ${n_average} -eq 1 ]]; then
dec_models=${dec_model}
fi
if [[ ${n_average} -ne 1 ]]; then
# Average models
dec_model=avg_${n_average}_checkpoint.pt
if [[ ${epoch_ensemble} -eq 1 ]]; then
avg_model=avg_epoch${n_average}_checkpoint.pt
if [[ ! -f ${model_dir}/${dec_model} ]]; then
if [[ ! -f ${model_dir}/${avg_model} ]]; then
cmd="python3 ${code_dir}/scripts/average_checkpoints.py
--inputs ${model_dir}
--num-epoch-checkpoints ${n_average}
--output ${model_dir}/${avg_model}"
echo -e "\033[34mRun command: \n${cmd} \033[0m"
[[ $eval -eq 1 ]] && eval $cmd
fi
dec_models+=(${avg_model})
fi
if [[ ${best_ensemble} -eq 1 ]]; then
avg_model=avg_best${n_average}_checkpoint.pt
if [[ ! -f ${model_dir}/${avg_model} ]]; then
cmd="python3 ${code_dir}/scripts/average_checkpoints.py
--inputs ${model_dir}
--num-best-checkpoints ${n_average}
--output ${model_dir}/${dec_model}"
--output ${model_dir}/${avg_model}"
echo -e "\033[34mRun command: \n${cmd} \033[0m"
[[ $eval -eq 1 ]] && eval $cmd
fi
else
dec_model=${dec_model}
dec_models+=(${avg_model})
fi
fi
if [[ -z ${device} || ${#device[@]} -eq 0 ]]; then
......@@ -399,6 +424,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
export CUDA_VISIBLE_DEVICES=${device}
fi
for dec_model in ${dec_models[@]}; do
suffix=alpha${len_penalty}
model_str=`echo $dec_model | sed -e "s#checkpoint##" | sed "s#.pt##"`
suffix=${suffix}_${model_str}
......@@ -428,6 +454,9 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
if [[ ${infer_score} -eq 1 ]]; then
suffix=${suffix}_score
fi
if [[ -n ${infer_tag} ]]; then
suffix=${suffix}_${infer_tag}
fi
suffix=`echo $suffix | sed -e "s#__#_#"`
result_file=${model_dir}/decode_result_${suffix}
......@@ -489,9 +518,9 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
cmd="${cmd}
--score-reference"
fi
if [[ -n ${infer_parameters} ]]; then
if [[ -n ${infer_parameter} ]]; then
cmd="${cmd}
${infer_parameters}"
${infer_parameter}"
fi
echo -e "\033[34mRun command: \n${cmd} \033[0m"
......@@ -577,5 +606,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
fi
done
echo
echo "" >> ${result_file}
cat ${result_file}
done
fi
......@@ -11,6 +11,7 @@ tokenizer=0
data_tag=
test_subset=(valid test)
test_subset=(test)
exp_name=
if [ "$#" -eq 1 ]; then
......
......@@ -85,8 +85,9 @@ n_average=10
beam_size=5
len_penalty=1.0
infer_debug=0
infer_score=0
# infer_parameters="--cal-monotonic-cross-attn-weights --cal-localness --localness-window 0.1 --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
infer_score=1
infer_parameters="--cal-monotonic-cross-attn-weights --cal-localness --localness-window 0.1 --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
infer_parameters="--cal-monotonic-cross-attn-weights --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
# Parsing Options
. ./local/parse_options.sh || exit 1;
......
set -e
eval=1
lcrm=1
tokenizer=0
vocab_type=unigram
vocab_size=5000
use_raw_audio=0
speed_perturb=0
dataset=mustc
root_dir=~/st
code_dir=${root_dir}/Fairseq-S2T
org_data_dir=${root_dir}/data/${dataset}
data_dir=${root_dir}/data/${dataset}/st
use_specific_dict=0
specific_prefix=st
specific_dir=${root_dir}/data/mustc/st
asr_vocab_prefix=spm_unigram10000_st_share
src_lang=en
tgt_lang=zh
subsets=(2019)
splits=$(echo ${subsets[*]} | sed 's/ /_/g')
cmd="python ${code_dir}/examples/speech_to_text/prep_audio_data.py
--data-root ${org_data_dir}
--output-root ${data_dir}
--task asr
--src-lang ${src_lang}
--tgt-lang ${tgt_lang}
--splits ${splits}
--vocab-type ${vocab_type}
--vocab-size ${vocab_size}"
if [[ ${use_raw_audio} -eq 1 ]]; then
cmd="$cmd
--raw"
fi
if [[ ${use_specific_dict} -eq 1 ]]; then
cp -r ${specific_dir}/${asr_vocab_prefix}.* ${data_dir}
cmd="$cmd
--asr-prefix ${asr_vocab_prefix}"
fi
if [[ ${speed_perturb} -eq 1 ]]; then
cmd="$cmd
--speed-perturb"
fi
if [[ ${lcrm} -eq 1 ]]; then
cmd="$cmd
--lowercase-src
--rm-punc-src"
fi
if [[ ${tokenizer} -eq 1 ]]; then
cmd="$cmd
--tokenizer"
fi
echo -e "\033[34mRun command: \n${cmd} \033[0m"
[[ $eval -eq 1 ]] && eval ${cmd}
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
ctc-mixup-consistent-weight: 0
inter-ctc-mixup-consistent-weight: 0
mixup-consistent-weight: 0
mixup-no-hard-loss: False
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
\ No newline at end of file
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
ctc-mixup-consistent-weight: 0.15
inter-ctc-mixup-consistent-weight: 0.1
mixup-consistent-weight: 0.5
mixup-no-hard-loss: False
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
\ No newline at end of file
arch: s2t_transformer_s
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
attention-dropout: 0.1
activation-dropout: 0.1
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
train-subset: train_mix_1,train_mix_2,train_mix_3,train_mix_4,train_mix_5,train_mix_6,train_mix_7,train_mix_8
valid-subset: dev_en
#ignore-prefix-size: 1
use-additional-ctc-text: true
sharded-data-load: True
max-epoch: 300
max-update: 300000
patience: 20
post-process: sentencepiece
#best_checkpoint_metric: loss
#maximize_best_checkpoint_metric: False
eval-bleu: True
eval-bleu-args: {"beam": 5, "lenpen": 1.0}
eval-bleu-detok: moses
eval-bleu-remove-bpe: sentencepiece
eval-bleu-print-samples: True
best_checkpoint_metric: bleu
maximize_best_checkpoint_metric: True
# no-epoch-checkpoints: True
validate-interval: 5
keep-last-epochs: 10
keep-best-checkpoints: 10
num-workers: 8
no-progress-bar: True
log-interval: 100
seed: 1
label-smoothing: 0.1
report-accuracy: True
skip-invalid-size-inputs-valid-test: True
arch: s2t_transformer_m
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
layer-padding-mask: True
\ No newline at end of file
ctc-weight: 0.3
share-ctc-and-embed: True
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: transformer
adapter: none
# load-pretrained-encoder-from:
# load-pretrained-acoustic-encoder-from:
# load-pretrained-text-encoder-from:
# load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: transformer
adapter: none
# load-pretrained-encoder-from:
# load-pretrained-acoustic-encoder-from:
# load-pretrained-text-encoder-from:
# load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: pds
adapter: none
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 4_4_4_4
pds-attn-heads: 8_8_8_8
# load-pretrained-encoder-from:
# load-pretrained-acoustic-encoder-from:
# load-pretrained-text-encoder-from:
# load-pretrained-decoder-from:
\ No newline at end of file
use-enc-dlcl: True
use-dec-dlcl: True
arch: s2t_dual
asr-encoder: transformer
mt-encoder-layers: 6
mt-encoder: transformer
encoder-collaboration-mode: parallel
decoder-collaboration-mode: parallel
encoder-league-s1-ratio: 0.5
encoder-league-s2-ratio: 0.5
encoder-league-drop-net: False
encoder-league-drop-net-prob: 0.2
encoder-league-drop-net-mix: False
decoder-league-s1-ratio: 0.5
decoder-league-s2-ratio: 0.5
decoder-league-drop-net: False
decoder-league-drop-net-prob: 0.0
decoder-league-drop-net-mix: False
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: join_speech_and_text_loss
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-asr-encoder-from:
#load-pretrained-mt-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
compression-metric: threshold
compression-mode: create
compression-layers: 6,9
compression-threshold: 0.99
compression-norm: True
compression-pos: True
\ No newline at end of file
inter-ctc-weight: 0.2
inter-ctc-layers: 6,9
share-inter-ctc: True
ctc-pae: none
# ctc-pae: inter_league
# ctc-pae-ground-truth-ratio: 0.1
# pae-gumbel: True
# pae-distribution-hard: True
# pae-drop-prob: 0.0
# pae-distribution-cutoff: 10
# share-pae-and-ctc: True
# pae-embed-norm: True
# pae-out-norm: True
# ctc-self-distill-weight: 1
# target-ctc-self-distill-weight: 1
# ctc-self-distill-prob: 0.1
# cal-all-ctc: True
\ No newline at end of file
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: False
inter-mixup-decoder-emb: False
ctc-mixup-consistent-weight: 0
inter-ctc-mixup-consistent-weight: 0
mixup-consistent-weight: 0
mixup-no-hard-loss: False
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
\ No newline at end of file
inter-ctc-mlo: 1:2:3
\ No newline at end of file
arch: s2t_multibranch
junior-acoustic-encoder: transformer
acoustic-adapter: none
textual-adapter: none
junior-acoustic-encoder-layers: 12
senior-acoustic-encoder-layers: 6
textual-encoder-layers: 6
# collaboration-direction: none
# collaboration-direction: acoustic
# collaboration-direction: textual
collaboration-direction: both
collaboration-start: 0:0
collaboration-step: 1:1
# encoder-collaboration-mode: serial
# decoder-collaboration-mode: serial
encoder-collaboration-mode: parallel
decoder-collaboration-mode: parallel
use-raw-text: False
modality-switch: False
text-to-hidden-progress: 1:0:500
encoder-league-s1-ratio: 0.5
encoder-league-s2-ratio: 0.5
encoder-league-out-norm: False
encoder-league-gated: False
encoder-league-drop-net: False
encoder-league-drop-net-prob: 0.2
encoder-league-drop-net-mix: False
decoder-league-s1-ratio: 0.5
decoder-league-s2-ratio: 0.5
decoder-league-out-norm: False
decoder-league-gated: False
decoder-league-drop-net: False
decoder-league-drop-net-prob: 0.0
decoder-league-drop-net-mix: False
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
encoder-embed-norm: True
encoder-no-scale-embedding: True
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-attention-heads: 4
decoder-layers: 6
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
attention-dropout: 0.1
activation-dropout: 0.1
#adapter: inter_league
#adapter: none
#adapter-embed-norm: True
#adapter-out-norm: True
#share-adapter-and-ctc: True
#share-adapter-and-embed: True
#load-pretrained-junior-acoustic-encoder-from:
#load-pretrained-senior-acoustic-encoder-from:
#load-pretrained-textual-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_ctc
encoder-type: sate
criterion: ctc
zero_infinity: True
xctc-weight: 1.0
ctc-weight: 1.0
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: transformer
adapter: none
\ No newline at end of file
arch: s2t_ctc
encoder-type: sate
criterion: ctc
zero_infinity: True
xctc-weight: 1.0
ctc-weight: 1.0
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
acoustic-encoder: transformer
adapter: none
\ No newline at end of file
arch: s2t_ctc
encoder-type: sate
criterion: ctc
zero_infinity: True
xctc-weight: 1.0
ctc-weight: 1.0
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-layers: 12
text-encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
acoustic-encoder: pds
adapter: none
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 4_4_4_4
pds-attn-heads: 8_8_8_8
\ No newline at end of file
arch: pdss2t_transformer_s_16
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 2_2_6_2
pds-ratios: 2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_32
encoder-embed-dim: 256
pds-stages: 5
pds-layers: 2_2_3_3_2
pds-ratios: 2_2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1_1
pds-kernel-sizes: 5_5_5_5_5
pds-ffn-ratios: 8_8_8_8_8
pds-attn-heads: 4_4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_8
encoder-embed-dim: 256
pds-stages: 3
pds-layers: 4_4_4
pds-ratios: 2_2_1
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1
pds-kernel-sizes: 5_5_5
pds-ffn-ratios: 8_8_8
pds-attn-heads: 4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_8
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_8
encoder-embed-dim: 256
pds-stages: 3
pds-layers: 4_4_4
pds-ratios: 2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1
pds-kernel-sizes: 5_5_5
pds-ffn-ratios: 8_8_8
pds-attn-heads: 4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_m_16
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 2_2_6_2
pds-ratios: 2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 4_4_4_4
pds-attn-heads: 8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_m_32
encoder-embed-dim: 512
pds-stages: 5
pds-layers: 2_2_3_3_2
pds-ratios: 2_2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1_1
pds-kernel-sizes: 5_5_5_5_5
pds-ffn-ratios: 4_4_4_4_4
pds-attn-heads: 8_8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
\ No newline at end of file
arch: pdss2t_transformer_m_8
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 4_4_4_4
pds-attn-heads: 8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_16
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 3_3_8_4
pds-ratios: 2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_16
encoder-embed-dim: 512
pds-stages: 5
pds-layers: 3_3_4_4_4
pds-ratios: 2_2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1_1
pds-kernel-sizes: 5_5_5_5_5
pds-ffn-ratios: 8_8_8_8_8
pds-attn-heads: 8_8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_s_8
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 4_5_5_4
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 8_8_8_8
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_sd_16
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 3_3_8_4
pds-ratios: 2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_sd_32
encoder-embed-dim: 256
pds-stages: 5
pds-layers: 3_3_4_4_4
pds-ratios: 2_2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1_1
pds-kernel-sizes: 5_5_5_5_5
pds-ffn-ratios: 8_8_8_8_8
pds-attn-heads: 4_4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: pdss2t_transformer_sd_8
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 4_5_5_4
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
mixup-no-hard-loss: False
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 6,9
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
ctc-mixup-consistent-weight: 0.1
inter-ctc-mixup-consistent-weight: 0.05
xctc-mixup-consistent-weight: 0.05
inter-xctc-mixup-consistent-weight: 0.25
mixup-consistent-weight: 0.5
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
layer-padding-mask: True
\ No newline at end of file
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
mixup-no-hard-loss: True
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 6,9
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
ctc-mixup-consistent-weight: 0.1
inter-ctc-mixup-consistent-weight: 0.05
xctc-mixup-consistent-weight: 0.05
inter-xctc-mixup-consistent-weight: 0.25
mixup-consistent-weight: 0.5
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
layer-padding-mask: True
\ No newline at end of file
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
mixup-no-hard-loss: False
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
# MTL
ctc-weight: 0.3
inter-ctc-weight: 0.2
inter-ctc-layers: 6,9
share-inter-ctc: True
share-ctc-and-embed: True
ctc-pae: inter_league
pae-unnorm-input: True
ctc-mixup-consistent-weight: 0.15
inter-ctc-mixup-consistent-weight: 0.1
mixup-consistent-weight: 0.5
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
layer-padding-mask: True
\ No newline at end of file
# Append-based Interpolation Augmentation
inter-mixup: True
inter-mixup-layer: -1
inter-mixup-decoder-layer: 0
inter-mixup-prob: 1.0
inter-mixup-ratio: 1.0
inter-mixup-beta: 0.2
inter-mixup-keep-org: True
inter-mixup-decoder-emb: True
mixup-no-hard-loss: True
no-specaugment: False
layer-out-norm: False
inter-mixup-ratio-decay: False
inter-mixup-ratio-decay-params: 20000,40000,0
# MTL
ctc-weight: 0.3
share-ctc-and-embed: True
inter-ctc-weight: 0.2
inter-ctc-layers: 6,9
share-inter-ctc: True
ctc-pae: inter_league
pae-unnorm-input: True
ctc-mixup-consistent-weight: 0.15
inter-ctc-mixup-consistent-weight: 0.1
mixup-consistent-weight: 0.5
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
layer-padding-mask: True
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: transformer
adapter: inter_league
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 4
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.1
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_transformer_m
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
ctc-layer: 12
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 16
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.1
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_transformer_m
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
ctc-layer: 12
#xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
share-inter-ctc: True
#inter-xctc-weight: 0.05
#inter-xctc-layers: 16
# Prediction-aware encoding
ctc-pae: inter_league
#xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
#xctc-pae-ground-truth-ratio: 0.1
#xctc-pae-ground-truth-only-mistake: True
#pae-oracle-smooth: True
arch: s2t_transformer_m
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9,12,15
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 6,9,12,15
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.1
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_transformer_m
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 18
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# Bilingual CTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.1
# InterCTC
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9,12,15
share-inter-ctc: True
inter-xctc-weight: 0.05
inter-xctc-layers: 6,9,12,15
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.1
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: transformer
adapter: inter_league
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# CTC & XCTC
share-ctc-and-embed: True
share-xctc-and-embed: True
ctc-weight: 0.2
xctc-weight: 0.2
# InterCTC
share-inter-ctc: True
inter-ctc-weight: 0.1
inter-ctc-layers: 6,9
inter-xctc-weight: 0.1
inter-xctc-layers: 4
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Cross-layer attn
xctc-cross-attn: True
cross-attn-start-layer: 3
cross-attn-layer: 2
cross-attn-collaboration-mode: serial
cross-attn-league-drop-net: True
cross-attn-league-drop-net-prob: 0.1
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.5
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_ctc
encoder-type: sate
criterion: ctc
zero_infinity: True
xctc-weight: 1.0
ctc-weight: 1.0
share-ctc-and-embed: True
share-xctc-and-embed: True
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
text-no-pos-emb: True
textual-encoder-embed-norm: False
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 8
acoustic-encoder: transformer
adapter: inter_league
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# InterCTC
share-inter-ctc: True
inter-ctc-weight: 1.0
inter-ctc-layers: 6,9
inter-xctc-weight: 1.0
inter-xctc-layers: 6,9
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
# Cross-layer attn
xctc-cross-attn: True
cross-attn-start-layer: 4
cross-attn-layer: 3
cross-attn-collaboration-mode: serial
cross-attn-league-drop-net: True
cross-attn-league-drop-net-prob: 0.1
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.8
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_ctc
encoder-type: transformer
criterion: ctc
zero_infinity: True
xctc-weight: 1.0
ctc-weight: 1.0
share-ctc-and-embed: True
share-xctc-and-embed: True
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 18
encoder-attention-heads: 8
# Conformer
macaron-style: True
use-cnn-module: True
cnn-module-kernel: 15
encoder-attention-type: rel_pos
encoder-activation-fn: swish
# InterCTC
share-inter-ctc: True
inter-ctc-weight: 1.0
inter-ctc-layers: 6,9,12,15
inter-xctc-weight: 1.0
inter-xctc-layers: 6,9,12,15
# Prediction-aware encoding
ctc-pae: inter_league
xctc-pae: inter_league
pae-unnorm-input: True
# Cross-layer attn
# xctc-cross-attn: True
# cross-attn-start-layer: 4
# cross-attn-layer: 3
# cross-attn-collaboration-mode: serial
# cross-attn-league-drop-net: True
# cross-attn-league-drop-net-prob: 0.1
# Curriculum learning mixing
xctc-pae-ground-truth-ratio: 0.8
xctc-pae-ground-truth-only-mistake: True
pae-oracle-smooth: True
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
ctc-weight: 0.3
share-ctc-and-embed: True
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: transformer
adapter: inter_league
# adapter: none
# adapter-embed-norm: True
# adapter-out-norm: True
# load-pretrained-encoder-from:
# load-pretrained-acoustic-encoder-from:
# load-pretrained-text-encoder-from:
# load-pretrained-decoder-from:
\ No newline at end of file
encoder-attention-type: rel_pos
# encoder-attention-type: relative
# decoder-attention-type: relative
# max-encoder-relative-length: 100
# max-decoder-relative-length: 20
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: transformer
adapter: inter_league
#adapter: none
#adapter-embed-norm: True
#adapter-out-norm: True
#share-adapter-and-ctc: True
#share-adapter-and-embed: True
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-embed-dim: 512
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: transformer
adapter: inter_league
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 1e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 2048
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.15
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 8
decoder-embed-dim: 512
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 8
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 512
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 512_512_512_512
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 4_4_4_4
pds-attn-heads: 8_8_8_8
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-normalize-before: True
decoder-normalize-before: True
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 18
text-encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: transformer
adapter: inter_league
#adapter-embed-norm: True
#adapter-out-norm: True
#share-adapter-and-ctc: True
#share-adapter-and-embed: True
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 2_2_6_2
pds-ratios: 2_2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 256
pds-stages: 3
pds-layers: 4_4_4
pds-ratios: 2_2_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1
pds-kernel-sizes: 5_5_5
pds-ffn-ratios: 8_8_8
pds-attn-heads: 4_4_4
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 12
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 3_3_3_3
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_sate
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
textual-encoder-embed-norm: True
textual-encoder-no-scale-embedding: True
encoder-normalize-before: True
decoder-normalize-before: True
dropout: 0.1
activation-fn: relu
encoder-ffn-embed-dim: 2048
encoder-layers: 18
text-encoder-layers: 6
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
acoustic-encoder: pds
adapter: inter_league
encoder-embed-dim: 256
pds-stages: 4
pds-layers: 4_5_5_4
pds-ratios: 2_2_1_2
pds-fusion: False
pds-fusion-method: all_conv2
pds-fusion-layers: 0_1_1_1
pds-fusion-weight: 0.2_0.3_0.5
pds-embed-dims: 256_256_256_256
pds-ds-method: conv
pds-embed-norm: True
pds-position-embed: 1_1_1_1
pds-kernel-sizes: 5_5_5_5
pds-ffn-ratios: 8_8_8_8
pds-attn-heads: 4_4_4_4
#load-pretrained-encoder-from:
#load-pretrained-acoustic-encoder-from:
#load-pretrained-text-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
arch: s2t_w2v2_transformer
share-decoder-input-output-embed: True
optimizer: adam
clip-norm: 10.0
lr-scheduler: inverse_sqrt
warmup-init-lr: 1e-7
warmup-updates: 10000
lr: 2e-3
adam-betas: (0.9,0.98)
criterion: label_smoothed_cross_entropy_with_ctc
encoder-embed-norm: True
encoder-no-scale-embedding: True
subsampling-type: conv1d
subsampling-layers: 2
subsampling-filter: 1024
subsampling-kernel: 5
subsampling-stride: 2
subsampling-norm: none
subsampling-activation: glu
dropout: 0.1
activation-fn: relu
encoder-embed-dim: 256
encoder-ffn-embed-dim: 2048
encoder-layers: 12
decoder-layers: 6
encoder-attention-heads: 4
decoder-embed-dim: 256
decoder-ffn-embed-dim: 2048
decoder-attention-heads: 4
attention-dropout: 0.1
activation-dropout: 0.1
w2v2-model-path: /home/xuchen/st/models/w2v2/wav2vec_small.pt
freeze-w2v: False
#load-pretrained-encoder-from:
#load-pretrained-decoder-from:
\ No newline at end of file
xctc-weight: 0.3
share-xctc-and-embed: True
\ No newline at end of file
inter-xctc-weight: 0.2
inter-xctc-layers: 6,9
xctc-pae: none
# xctc-pae: inter_league
xctc-cross-attn: False
cross-attn-start-layer: 7
cross-attn-layer: 6
cross-attn-collaboration-mode: parallel
cross-attn-league-s1-ratio: 0.5
cross-attn-league-s2-ratio: 0.5
cross-attn-league-out-norm: False
cross-attn-league-gated: False
cross-attn-league-drop-net: False
cross-attn-league-drop-net-prob: 0.2
cross-attn-league-drop-net-mix: False
# xctc-pae-ground-truth-ratio: 0.1
# xctc-pae-ground-truth-ratio-adaptive: True
# xctc-pae-ground-truth-only-mistake: True
# pae-oracle-smooth: True
# pae-gumbel: True
# pae-distribution-hard: True
# pae-drop-prob: 0.0
# pae-distribution-cutoff: 10
# share-pae-and-xctc: True
# pae-embed-norm: True
# pae-out-norm: True
# ctc-self-distill-weight: 1
# target-ctc-self-distill-weight: 1
# ctc-self-distill-prob: 0.1
# cal-all-ctc: True
\ No newline at end of file
#!/usr/bin/env bash
gpu_num=1
data_tag=
test_subset=(tst-COMMON_en-de tst-COMMON_en-fr tst-COMMON_en-es tst-COMMON_en-it tst-COMMON_en-nl tst-COMMON_en-pt tst-COMMON_en-ro tst-COMMON_en-ru)
test_subset=(tst-COMMON_en)
#test_subset=(test_en-fr_1k)
exp_name=
if [ "$#" -eq 1 ]; then
exp_name=$1
fi
sacrebleu=1
ctc_infer=0
n_average=1
beam_size=5
infer_ctc_weight=0
len_penalty=1.0
max_tokens=20000
batch_size=0
infer_debug=0
dec_model=checkpoint_last.pt
cmd="./run.sh
--stage 2
--stop_stage 2
--gpu_num ${gpu_num}
--exp_name ${exp_name}
--sacrebleu ${sacrebleu}
--n_average ${n_average}
--beam_size ${beam_size}
--len_penalty ${len_penalty}
--batch_size ${batch_size}
--max_tokens ${max_tokens}
--dec_model ${dec_model}
--ctc_infer ${ctc_infer}
--infer_ctc_weight ${infer_ctc_weight}
--infer_debug ${infer_debug}
"
if [[ -n ${data_tag} ]]; then
cmd="$cmd --data_tag ${data_tag}"
fi
if [[ ${#test_subset[@]} -ne 0 ]]; then
subsets=$(echo ${test_subset[*]} | sed 's/ /,/g')
cmd="$cmd --test_subset ${subsets}"
fi
echo $cmd
eval $cmd
set -e
gpu_num=1
root_dir=/home/xuchen/st/Fairseq-S2T
ckpt=/home/xuchen/st/checkpoints/mustc-v2/st
model_txt=$1
set=$2
test_subset=$3
#data_dir=/home/xuchen/st/data/mustc-v2/st_lcrm/en-de
#test_subset=(tst-COMMON)
data_dir=/media/data/tst/$set/en-de
#test_subset=(office)
#test_subset=(webrtc1)
#test_subset=(adap2)
data_config=config_st_share.yaml
result_file=./result
beam_size=5
lenpen=0.6
max_tokens=10000
models=()
i=0
for line in `cat $model_txt`; do
i=`expr $i + 1`
model_dir=$ckpt/$line
[[ ! -d $model_dir ]] && echo $model_dir && exit 1;
if [[ -f $model_dir/avg_10_checkpoint.pt ]]; then
model=$model_dir/avg_10_checkpoint.pt
else
model=$model_dir/checkpoint_best.pt
fi
[[ ! -f $model ]] && echo $model && exit 1;
models[$i]=$model
done
models=`echo ${models[*]} | sed 's/ /:/g'`
res_dir=$ckpt/ensemble/$set
i=0
while :
do
if [[ -d $res_dir/$i ]]; then
i=`expr $i + 1`
else
res_dir=$res_dir/$i
break
fi
done
mkdir -p $res_dir
cp $model_txt $res_dir
if [[ -z ${device} || ${#device[@]} -eq 0 ]]; then
if [[ ${gpu_num} -eq 0 ]]; then
device=()
else
source ./local/utils.sh
device=$(get_devices $gpu_num 0)
fi
fi
export CUDA_VISIBLE_DEVICES=${device}
for subset in ${test_subset[@]}; do
subset=${subset}_st
cmd="python ${root_dir}/fairseq_cli/generate.py
${data_dir}
--config-yaml ${data_config}
--gen-subset ${subset}
--task speech_to_text
--path ${models}
--results-path ${res_dir}
--skip-invalid-size-inputs-valid-test
--max-tokens ${max_tokens}
--beam ${beam_size}
--lenpen ${lenpen}
--scoring sacrebleu"
echo -e "\033[34mRun command: \n${cmd} \033[0m"
eval $cmd
tail -n 1 ${res_dir}/generate-${subset}.txt
cd $res_dir
evaluate.sh translation-${subset}.txt $set
cd -
done
#!/usr/bin/env bash
set -e
ref=$1
gen=$2
tokenizer=$3
lang=$4
lang_pair=en-${lang}
record=$(mktemp -t temp.record.XXXXXX)
if [[ ${tokenizer} -eq 1 ]]; then
echo "MultiBLEU" > ${record}
cmd="multi-bleu.perl ${ref} < ${gen}"
eval $cmd | head -n 1 >> ${record}
cmd="detokenizer.perl -q -l ${lang} --threads 32 < ${ref} > ${ref}.detok"
eval $cmd
cmd="detokenizer.perl -q -l ${lang} --threads 32 < ${gen} > ${gen}.detok"
eval $cmd
ref=${ref}.detok
gen=${gen}.detok
fi
echo "SacreBLEU" >> ${record}
cmd="cat ${gen} | sacrebleu ${ref} -m bleu -w 4 -l ${lang_pair}"
eval $cmd >> ${record}
cat ${record}
rm ${record}
\ No newline at end of file
#!/usr/bin/env bash
set -e
infer_dir=$1
tag=$2
s2s_infer_file=${infer_dir}/$3
org_ctc_infer_file=${infer_dir}/$4
ref=$5
tokenizer=$6
lang=$7
idx=${infer_dir}/${tag}_idx
ctc_infer=${infer_dir}/${tag}_ctc_infer
ctc_infer_sort=${infer_dir}/${tag}_ctc_infer_sort
if [[ ! -f ${ctc_infer_sort} ]]; then
cut -f1 ${s2s_infer_file} > ${idx}
paste ${idx} ${org_ctc_infer_file} > ${ctc_infer}
sort -n -t $'\t' ${ctc_infer} | cut -f2 > ${ctc_infer_sort}
fi
gen=${ctc_infer_sort}
./cal_bleu.sh ${ref} ${gen} ${tokenizer} ${lang}
\ No newline at end of file
import unicodedata
import jiwer
import jiwer.transforms as tr
import sys
ref_file = sys.argv[1]
hyp_file = sys.argv[2]
wer_standardize = tr.Compose(
[
tr.SubstituteRegexes({r"<<unk>>": r"@"}),
tr.ToLowerCase(),
tr.RemovePunctuation(),
tr.Strip(),
tr.ExpandCommonEnglishContractions(),
tr.RemoveKaldiNonWords(),
tr.RemoveWhiteSpace(replace_by_space=True),
tr.ReduceToListOfListOfWords(),
]
)
cer_standardize = tr.Compose(
[
tr.SubstituteRegexes({r"<<unk>>": r"@"}),
tr.ToLowerCase(),
tr.RemovePunctuation(),
tr.Strip(),
tr.ReduceToListOfListOfChars(),
]
)
ref_lines = open(ref_file, "r").readlines()
hyp_lines = open(hyp_file, "r").readlines()
wer = jiwer.wer(ref_lines, hyp_lines,
truth_transform=wer_standardize,
hypothesis_transform=wer_standardize,
)
cer = jiwer.cer(ref_lines, hyp_lines,
truth_transform=cer_standardize,
hypothesis_transform=cer_standardize,
)
print("WER: %.4f" % wer)
print("CER: %.4f" % cer)
#!/usr/bin/env bash
set -e
infer_dir=$1
tag=$2
s2s_infer_file=${infer_dir}/$3
org_ctc_infer_file=${infer_dir}/$4
ref=$5
idx=${infer_dir}/${tag}_idx
ctc_infer=${infer_dir}/${tag}_ctc_infer
ctc_infer_sort=${infer_dir}/${tag}_ctc_infer_sort
cut -f1 ${s2s_infer_file} > ${idx}
paste ${idx} ${org_ctc_infer_file} > ${ctc_infer}
sort -n -t $'\t' ${ctc_infer} | cut -f2 > ${ctc_infer_sort}
python3 ./cal_wer.py ${ref} ${ctc_infer_sort}
\ No newline at end of file
import sys
import csv
tsv_file = sys.argv[1]
out_file = sys.argv[2]
extract_item = sys.argv[3]
with open(tsv_file) as f:
reader = csv.DictReader(
f,
delimiter="\t",
quotechar=None,
doublequote=False,
lineterminator="\n",
quoting=csv.QUOTE_NONE,
)
samples = [dict(e) for e in reader]
fw = open(out_file, "w", encoding="utf-8")
for s in samples:
if extract_item in s:
fw.write("%s\n" % s[extract_item])
else:
print("Error in sample: ")
print(s)
exit()
#!/usr/bin/env bash
gpu_num=4
cmd="sh train.sh"
while :
do
record=$(mktemp -t temp.record.XXXXXX)
gpustat > $record
all_devices=$(seq 0 "$(sed '1,2d' ${record} | wc -l)");
count=0
for dev in ${all_devices[@]}
do
line=$((dev + 2))
use=$(head -n $line ${record} | tail -1 | cut -d '|' -f3 | cut -d '/' -f1)
if [[ $use -lt 100 ]]; then
device[$count]=$dev
count=$((count + 1))
if [[ $count -eq $gpu_num ]]; then
break
fi
fi
done
if [[ ${#device[@]} -lt $gpu_num ]]; then
sleep 60s
else
echo "Run $cmd"
eval $cmd
sleep 10s
exit
fi
done
#!/usr/bin/env bash
# Copyright 2012 Johns Hopkins University (Author: Daniel Povey);
# Arnab Ghoshal, Karel Vesely
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
# MERCHANTABLITY OR NON-INFRINGEMENT.
# See the Apache 2 License for the specific language governing permissions and
# limitations under the License.
# Parse command-line options.
# To be sourced by another script (as in ". parse_options.sh").
# Option format is: --option-name arg
# and shell variable "option_name" gets set to value "arg."
# The exception is --help, which takes no arguments, but prints the
# $help_message variable (if defined).
###
### The --config file options have lower priority to command line
### options, so we need to import them first...
###
# Now import all the configs specified by command-line, in left-to-right order
for ((argpos=1; argpos<$#; argpos++)); do
if [ "${!argpos}" == "--config" ]; then
argpos_plus1=$((argpos+1))
config=${!argpos_plus1}
[ ! -r $config ] && echo "$0: missing config '$config'" && exit 1
. $config # source the config file.
fi
done
###
### Now we process the command line options
###
i=1
argv="$@"
while true; do
key=${!i}
j=$(($i + 1))
value=${!j}
[ -z "${!i:-}" ] && break; # break if there are no arguments
case "${key}" in
# If the enclosing script is called with --help option, print the help
# message and exit. Scripts should put help messages in $help_message
--help|-h) if [ -z "$help_message" ]; then echo "No help found." 1>&2;
else printf "$help_message\n" 1>&2 ; fi;
exit 0 ;;
--*=*) echo "$0: options to scripts must be of the form --name value, got '${key}}'"
exit 1 ;;
# If the first command-line argument begins with "--" (e.g. --foo-bar),
# then work out the variable name as $name, which will equal "foo_bar".
--*) name=`echo "${key}" | sed s/^--// | sed s/-/_/g`;
# Next we test whether the variable in question is undefned-- if so it's
# an invalid option and we die. Note: $0 evaluates to the name of the
# enclosing script.
# The test [ -z ${foo_bar+xxx} ] will return true if the variable foo_bar
# is undefined. We then have to wrap this test inside "eval" because
# foo_bar is itself inside a variable ($name).
#eval '[ -z "${'$name'+xxx}" ]' && echo "$0: invalid option $1" 1>&2 && exit 1;
oldval="`eval echo \\$$name`";
# Work out whether we seem to be expecting a Boolean argument.
if [ "$oldval" == "true" ] || [ "$oldval" == "false" ]; then
was_bool=true;
else
was_bool=false;
fi
# Set the variable to the right value-- the escaped quotes make it work if
# the option had spaces, like --cmd "queue.pl -sync y"
# echo $name
eval $name=\"${value}\";
# Check that Boolean-valued arguments are really Boolean.
if $was_bool && [[ "${value}" != "true" && "${value}" != "false" ]]; then
echo "$0: expected \"true\" or \"false\": ${key} ${value}" 1>&2
exit 1;
fi
# shift 2;
i=$(($i + 2))
;;
*) break;
esac
done
# Check for an empty argument to the --cmd option, which can easily occur as a
# result of scripting errors.
[ ! -z "${cmd+xxx}" ] && [ -z "$cmd" ] && echo "$0: empty argument to --cmd option" 1>&2 && exit 1;
true; # so this script returns exit code 0.
get_devices(){
gpu_num=$1
use_cpu=$2
device=()
while :
do
record=$(mktemp -t temp.record.XXXXXX)
gpustat > $record
all_devices=$(seq 0 "$(sed '1,2d' ${record} | wc -l)");
count=0
for dev in ${all_devices[@]}
do
line=$((dev + 2))
use=$(head -n $line ${record} | tail -1 | cut -d '|' -f3 | cut -d '/' -f1)
if [[ $use -lt 1000 ]]; then
device[$count]=$dev
count=$((count + 1))
if [[ $count -eq $gpu_num ]]; then
break
fi
fi
done
if [[ ${#device[@]} -lt $gpu_num ]]; then
if [[ $use_cpu -eq 1 ]]; then
device=(-1)
else
sleep 60s
fi
else
break
fi
done
echo ${device[*]} | sed 's/ /,/g'
return $?
}
#!/usr/bin/env bash
# training the model
gpu_num=8
update_freq=1
max_tokens=40000
extra_tag=
extra_parameter=
#extra_tag="${extra_tag}"
#extra_parameter="${extra_parameter} "
exp_tag=
# Base
#config_list=(base conformer ctc)
# SATE
config_list=(sate conformer ctc)
# PDS
#config_list=(pds_base_8 conformer ctc)
# exp full name
exp_name=
train_config=$(echo ${config_list[*]} | sed 's/ /,/g')
cmd="./run.sh
--stage 1
--stop_stage 2
--gpu_num ${gpu_num}
--update_freq ${update_freq}
--train_config ${train_config}
--max_tokens ${max_tokens}
"
if [[ -n ${exp_name} ]]; then
cmd="$cmd --exp_name ${exp_name}"
fi
if [[ -n ${exp_tag} ]]; then
cmd="$cmd --exp_tag ${exp_tag}"
fi
if [[ -n ${extra_tag} ]]; then
cmd="$cmd --extra_tag ${extra_tag}"
fi
if [[ -n ${extra_parameter} ]]; then
cmd="$cmd --extra_parameter \"${extra_parameter}\""
fi
echo ${cmd}
eval ${cmd}
#train-subset: train_en-de,train_en-fr,train_en-es,train_en-it,train_en-nl,train_en-pt,train_en-ro,train_en-ru
train-subset: train_mix_1,train_mix_2,train_mix_3,train_mix_4,train_mix_5,train_mix_6,train_mix_7,train_mix_8
valid-subset: dev_en-de,dev_en-fr,dev_en-es,dev_en-it,dev_en-nl,dev_en-pt,dev_en-ro,dev_en-ru
#valid-subset: dev_en-de
#valid-subset: dev_en-de,dev_en-fr,dev_en-es,dev_en-it,dev_en-nl,dev_en-pt,dev_en-ro,dev_en-ru
valid-subset: dev_en-de
#train-subset: train_en-de,train_en-fr,train_en-es,train_en-it
#valid-subset: dev_en-de,dev_en-fr,dev_en-es,dev_en-it
ignore-prefix-size: 1
prefix-size: 1
sharded-data-load: True
max-epoch: 100
#sharded-data-load: True
max-epoch: 300
max-update: 300000
patience: 20
post-process: sentencepiece
best_checkpoint_metric: loss
maximize_best_checkpoint_metric: False
#best_checkpoint_metric: loss
#maximize_best_checkpoint_metric: False
#eval-bleu: True
eval-bleu-args: {"beam": 5, "lenpen": 1.0}
eval-bleu: True
eval-bleu-args: {"beam": 5, "lenpen": 1.0, "prefix_size": 1}
eval-bleu-detok: moses
eval-bleu-remove-bpe: sentencepiece
eval-bleu-print-samples: True
#best_checkpoint_metric: bleu
#maximize_best_checkpoint_metric: True
best_checkpoint_metric: bleu
maximize_best_checkpoint_metric: True
# no-epoch-checkpoints: True
validate-interval: 5
......
......@@ -2,9 +2,9 @@
gpu_num=1
data_tag=
data_tag=stp
test_subset=(tst-COMMON_en-de tst-COMMON_en-fr tst-COMMON_en-es tst-COMMON_en-it tst-COMMON_en-nl tst-COMMON_en-pt tst-COMMON_en-ro tst-COMMON_en-ru)
#test_subset=(tst-COMMON_en-de)
test_subset=(tst-COMMON_en-de)
#test_subset=(test_en-fr_1k)
exp_name=
......@@ -18,10 +18,10 @@ n_average=10
beam_size=5
infer_ctc_weight=0
len_penalty=1.0
max_tokens=30000
max_tokens=20000
batch_size=0
infer_debug=0
dec_model=checkpoint_last.pt
dec_model=checkpoint_best.pt
cmd="./run.sh
--stage 2
......
......@@ -4,6 +4,7 @@ gpu_num=1
data_tag=
test_subset=(dev tst-COMMON)
#test_subset=(tst-COMMON)
exp_name=
if [ "$#" -eq 1 ]; then
......@@ -11,12 +12,12 @@ if [ "$#" -eq 1 ]; then
fi
sacrebleu=1
ctc_infer=1
ctc_infer=0
n_average=10
beam_size=5
infer_ctc_weight=0
len_penalty=1.0
max_tokens=50000
max_tokens=20000
batch_size=0
infer_debug=0
dec_model=checkpoint_best.pt
......
exp_name=$1
#./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint10.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint30.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint50.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint70.pt
exit
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint100.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint120.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint140.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint160.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint180.pt
./run.sh --stage 2 --exp_name $exp_name --n_average 1 --test_subset tst-COMMON --dec_model checkpoint200.pt
......@@ -79,7 +79,7 @@ step_valid=0
bleu_valid=0
# Decoding Settings
batch_size=0
batch_size=1
sacrebleu=1
dec_model=checkpoint_best.pt
ctc_infer=0
......@@ -89,6 +89,7 @@ beam_size=5
len_penalty=1.0
infer_debug=0
infer_score=0
#infer_parameters=" --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
#infer_parameters="--cal-monotonic-cross-attn-weights --cal-localness --localness-window 0.1 --cal-topk-cross-attn-weights --topk-cross-attn-weights 15 --cal-entropy"
# Parsing Options
......
......@@ -2,7 +2,7 @@
train-subset: train_zh,train_en,train_cs
valid-subset: dev_zh,dev_en,dev_cs
max-epoch: 100
max-epoch: 300
max-update: 100000
patience: 20
post-process: sentencepiece
......@@ -11,7 +11,7 @@ post-process: sentencepiece
# maximize-best-checkpoint-metric: False
eval-wer: True
eval-wer-args: {"beam": 1, "lenpen": 1.0}
eval-wer-args: {"beam": 1, "lenpen": 1.0, "prefix_size": 1}
eval-wer-tok-args: {"wer_remove_punct": true, "wer_lowercase": true, "wer_char_level": false}
eval-wer-remove-bpe: sentencepiece
eval-wer-print-samples: True
......
......@@ -3,8 +3,8 @@
gpu_num=1
data_tag=asr
test_subset=(dev test)
test_subset=(test)
test_subset=(test_zh test_en test_cs)
#test_subset=(test_cs_zh)
exp_name=
if [ "$#" -eq 1 ]; then
......@@ -12,12 +12,12 @@ if [ "$#" -eq 1 ]; then
fi
cer=1
ctc_infer=1
ctc_infer=0
n_average=10
beam_size=5
infer_ctc_weight=0
len_penalty=1.0
max_tokens=50000
max_tokens=20000
batch_size=0
infer_debug=0
dec_model=checkpoint_best.pt
......
......@@ -38,7 +38,7 @@ data_tag=asr
task=speech_to_text
vocab_type=unigram
vocab_size=32000
vocab_size=10000
speed_perturb=0
lcrm=0
tokenizer=0
......
......@@ -59,7 +59,7 @@ do
echo_flag=1
while :
do
gpustat
#gpustat
record=$(mktemp -t temp.record.XXXXXX)
gpustat > $record
all_devices=$(seq 0 "$(sed '1,2d' ${record} | wc -l)");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论