Skip to content

Commit 8e615dd

Browse files
authored
Merge pull request #200 from hirofumi0810/transformer
Update CSJ configuration files
2 parents a5d037a + 6eb09a6 commit 8e615dd

15 files changed

+213
-6
lines changed

examples/csj/s5/conf/asr/blstm_mocha.yaml renamed to examples/csj/s5/conf/asr/mocha/blstm_mocha.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ batch_size: 30
4040
optimizer: adam
4141
n_epochs: 25
4242
convert_to_sgd_epoch: 100
43-
print_step: 400
43+
print_step: 800
4444
metric: edit_distance
4545
lr: 1e-3
4646
lr_decay_type: always
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
### topology
2+
n_stacks: 1
3+
n_skips: 1
4+
max_n_frames: 1600
5+
conv_in_channel: 1
6+
conv_channels: "32_32"
7+
conv_kernel_sizes: "(3,3)_(3,3)"
8+
conv_strides: "(1,1)_(1,1)"
9+
conv_poolings: "(2,2)_(2,2)"
10+
conv_batch_norm: false
11+
subsample: "1_1_1_1_1"
12+
enc_type: conv_blstm
13+
bidirectional_sum_fwd_bwd: true
14+
enc_n_units: 512
15+
enc_n_projs: 0
16+
enc_n_layers: 5
17+
subsample_type: drop
18+
lc_chunk_size_left: 40
19+
lc_chunk_size_right: 40
20+
attn_type: mocha
21+
mocha_chunk_size: 4
22+
mocha_init_r: -4
23+
mocha_eps: 1e-6
24+
mocha_std: 1.0
25+
mocha_1dconv: false
26+
mocha_quantity_loss_weight: 1.0 ### this is important
27+
mocha_latency_metric: decot
28+
mocha_latency_loss_weight: 0.0
29+
mocha_decot_lookahead: 16
30+
attn_sharpening_factor: 1.0
31+
attn_dim: 512
32+
attn_n_heads: 1
33+
dec_type: lstm
34+
dec_n_units: 1024
35+
dec_n_projs: 0
36+
dec_n_layers: 1
37+
dec_bottleneck_dim: 1024 ### this is effective
38+
emb_dim: 512
39+
tie_embedding: false
40+
ctc_fc_list: "512"
41+
### optimization
42+
batch_size: 20
43+
optimizer: adam
44+
n_epochs: 25
45+
convert_to_sgd_epoch: 100
46+
print_step: 800
47+
metric: edit_distance
48+
lr: 1e-3
49+
lr_decay_type: always
50+
lr_decay_start_epoch: 10
51+
lr_decay_rate: 0.85
52+
lr_decay_patient_n_epochs: 0
53+
early_stop_patient_n_epochs: 5
54+
sort_stop_epoch: 100
55+
eval_start_epoch: 1
56+
warmup_start_lr: 1e-4
57+
warmup_n_steps: 0
58+
### initialization
59+
param_init: 0.1
60+
### regularization
61+
clip_grad_norm: 5.0
62+
dropout_in: 0.0
63+
dropout_enc: 0.4
64+
dropout_dec: 0.4
65+
dropout_emb: 0.4
66+
dropout_att: 0.0
67+
weight_decay: 1e-6
68+
lsm_prob: 0.1
69+
### MTL
70+
ctc_weight: 0.3
71+
ctc_lsm_prob: 0.1
72+
mtl_per_batch: false
73+
task_specific_layer: false
74+
### alignment
75+
train_word_alignment: /home/inaguma/kaldi/egs/csj/s5/exp/tri4_ali_nodup/split_word_alignments
76+
dev_word_alignment: /home/inaguma/kaldi/egs/csj/s5/exp/tri4_ali_train_dev/split_word_alignments
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
### topology
2+
n_stacks: 1
3+
n_skips: 1
4+
max_n_frames: 1600
5+
conv_in_channel: 1
6+
conv_channels: "32_32"
7+
conv_kernel_sizes: "(3,3)_(3,3)"
8+
conv_strides: "(1,1)_(1,1)"
9+
conv_poolings: "(2,2)_(2,2)"
10+
conv_batch_norm: false
11+
subsample: "1_1_1_1_1"
12+
enc_type: conv_blstm
13+
bidirectional_sum_fwd_bwd: true
14+
enc_n_units: 512
15+
enc_n_projs: 0
16+
enc_n_layers: 5
17+
subsample_type: drop
18+
lc_chunk_size_left: 40
19+
lc_chunk_size_right: 40
20+
attn_type: mocha
21+
mocha_chunk_size: 4
22+
mocha_init_r: -4
23+
mocha_eps: 1e-6
24+
mocha_std: 1.0
25+
mocha_1dconv: false
26+
mocha_quantity_loss_weight: 0.0 ### this is important
27+
mocha_latency_metric: minlt
28+
mocha_latency_loss_weight: 1.0
29+
attn_sharpening_factor: 1.0
30+
attn_dim: 512
31+
attn_n_heads: 1
32+
dec_type: lstm
33+
dec_n_units: 1024
34+
dec_n_projs: 0
35+
dec_n_layers: 1
36+
dec_bottleneck_dim: 1024 ### this is effective
37+
emb_dim: 512
38+
tie_embedding: false
39+
ctc_fc_list: "512"
40+
### optimization
41+
batch_size: 20
42+
optimizer: adam
43+
n_epochs: 25
44+
convert_to_sgd_epoch: 100
45+
print_step: 800
46+
metric: edit_distance
47+
lr: 1e-3
48+
lr_decay_type: always
49+
lr_decay_start_epoch: 10
50+
lr_decay_rate: 0.85
51+
lr_decay_patient_n_epochs: 0
52+
early_stop_patient_n_epochs: 5
53+
sort_stop_epoch: 100
54+
eval_start_epoch: 1
55+
warmup_start_lr: 1e-4
56+
warmup_n_steps: 0
57+
### initialization
58+
param_init: 0.1
59+
### regularization
60+
clip_grad_norm: 5.0
61+
dropout_in: 0.0
62+
dropout_enc: 0.4
63+
dropout_dec: 0.4
64+
dropout_emb: 0.4
65+
dropout_att: 0.0
66+
weight_decay: 1e-6
67+
lsm_prob: 0.1
68+
### MTL
69+
ctc_weight: 0.3
70+
ctc_lsm_prob: 0.1
71+
mtl_per_batch: false
72+
task_specific_layer: false
73+
### alignment
74+
train_word_alignment: /home/inaguma/kaldi/egs/csj/s5/exp/tri4_ali_nodup/split_word_alignments
75+
dev_word_alignment: /home/inaguma/kaldi/egs/csj/s5/exp/tri4_ali_train_dev/split_word_alignments

examples/csj/s5/conf/asr/lstm_mocha.yaml renamed to examples/csj/s5/conf/asr/mocha/lstm_mocha.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ batch_size: 30
3737
optimizer: adam
3838
n_epochs: 30 # for uni
3939
convert_to_sgd_epoch: 100
40-
print_step: 400
40+
print_step: 800
4141
metric: edit_distance
4242
lr: 1e-3
4343
lr_decay_type: always
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# optimization
2-
n_epochs: 15 # 20->15
2+
n_epochs: 20 # 25->20
33
print_step: 800
44
lr_decay_start_epoch: 5
55
lr_decay_rate: 0.8
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# optimization
2+
n_epochs: 40 # 20->40
3+
print_step: 1600 # 800->1600
4+
lr_decay_start_epoch: 5
5+
lr_decay_rate: 0.9
6+
7+
# mask
8+
freq_width: 13
9+
n_freq_masks: 2
10+
time_width: 50
11+
n_time_masks: 2
12+
time_width_upper: 1.0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# optimization
2+
n_epochs: 40 # 20->40
3+
print_step: 1600 # 800->1600
4+
lr_decay_start_epoch: 5
5+
lr_decay_rate: 0.9
6+
7+
# mask
8+
freq_width: 27
9+
n_freq_masks: 2
10+
time_width: 100
11+
n_time_masks: 2
12+
time_width_upper: 1.0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# optimization
2+
n_epochs: 40 # 20->40
3+
print_step: 1600 # 800->1600
4+
lr_decay_start_epoch: 5
5+
lr_decay_rate: 0.9
6+
7+
# mask
8+
freq_width: 27
9+
n_freq_masks: 2
10+
time_width: 50
11+
n_time_masks: 2
12+
time_width_upper: 1.0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# optimization
2+
n_epochs: 50 # 25->50
3+
print_step: 2400 # 400->2400
4+
5+
# mask
6+
freq_width: 27
7+
n_freq_masks: 2
8+
time_width: 100
9+
n_time_masks: 2
10+
time_width_upper: 1.0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# optimization
2+
n_epochs: 50 # 25->50
3+
print_step: 2400 # 400->2400
4+
5+
# mask
6+
freq_width: 27
7+
n_freq_masks: 2
8+
time_width: 50
9+
n_time_masks: 2
10+
time_width_upper: 1.0

examples/csj/s5/conf/lm/transformer_xl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# topology
22
lm_type: transformer_xl
3+
n_layers: 12
34
transformer_d_model: 512
45
transformer_d_ff: 2048
5-
n_layers: 12
66
transformer_n_heads: 8
77
tie_embedding: true
88
# optimization

examples/csj/s5/conf/lm/transformerlm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# topology
22
lm_type: transformer
3-
transformer_d_model: 512
4-
transformer_d_ff: 2048
53
n_layers: 12
64
transformer_pe_type: add
5+
transformer_d_model: 512
6+
transformer_d_ff: 2048
77
transformer_n_heads: 8
88
tie_embedding: true
99
# optimization

0 commit comments

Comments
 (0)