File size: 2,231 Bytes
8fd9402
 
 
 
7818cee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
license: apache-2.0
---
See https://github.com/k2-fsa/icefall/pull/454

### training command:
```bash
./pruned_transducer_stateless5/train.py \
  --exp-dir pruned_transducer_stateless5/exp \
  --num-encoder-layers 18 \
  --dim-feedforward 2048 \
  --nhead 8 \
  --encoder-dim 512 \
  --decoder-dim 512 \
  --joiner-dim 512 \
  --full-libri 1 \
  --dynamic-chunk-training 1 \
  --causal-convolution 1 \
  --short-chunk-size 20 \
  --num-left-chunks 4 \
  --max-duration 300 \
  --world-size 4 \
  --start-epoch 1 \
  --num-epochs 25
```

You can find the tensorboard log here <https://tensorboard.dev/experiment/rO04h6vjTLyw0qSxjp4m4Q>

### The decoding command is:
```bash
decoding_method="greedy_search"  # "fast_beam_search", "modified_beam_search"
for chunk in 2 4 8 16; do
  for left in 32 64; do
    ./pruned_transducer_stateless5/decode.py \
            --num-encoder-layers 18 \
            --dim-feedforward 2048 \
            --nhead 8 \
            --encoder-dim 512 \
            --decoder-dim 512 \
            --joiner-dim 512 \
            --simulate-streaming 1 \
            --decode-chunk-size ${chunk} \
            --left-context ${left} \
            --causal-convolution 1 \
            --epoch 25 \
            --avg 5 \
            --exp-dir ./pruned_transducer_stateless5/exp \
            --max-sym-per-frame 1 \
            --max-duration 1000 \
            --decoding-method ${decoding_method}
  done
done
```

### export command is:
```bash
./pruned_transducer_stateless5/export.py \
        --streaming-model 1 \
        --causal-convolution 1 \
        --num-encoder-layers 18 \
        --dim-feedforward 2048 \
        --nhead 8 \
        --encoder-dim 512 \
        --decoder-dim 512 \
        --joiner-dim 512 \
        --epoch 25 \
        --avg 5 \
        --exp-dir ./pruned_transducer_stateless5/exp

./pruned_transducer_stateless5/export.py \
        --streaming-model 1 \
        --causal-convolution 1 \
        --num-encoder-layers 18 \
        --dim-feedforward 2048 \
        --nhead 8 \
        --encoder-dim 512 \
        --decoder-dim 512 \
        --joiner-dim 512 \
        --epoch 25 \
        --avg 5 \
        --exp-dir ./pruned_transducer_stateless5/exp \
        --jit 1
```