Update README.md
Browse files
README.md
CHANGED
@@ -2,3 +2,82 @@
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
See https://github.com/k2-fsa/icefall/pull/454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
See https://github.com/k2-fsa/icefall/pull/454
|
5 |
+
|
6 |
+
### training command:
|
7 |
+
```bash
|
8 |
+
./pruned_transducer_stateless5/train.py \
|
9 |
+
--exp-dir pruned_transducer_stateless5/exp \
|
10 |
+
--num-encoder-layers 18 \
|
11 |
+
--dim-feedforward 2048 \
|
12 |
+
--nhead 8 \
|
13 |
+
--encoder-dim 512 \
|
14 |
+
--decoder-dim 512 \
|
15 |
+
--joiner-dim 512 \
|
16 |
+
--full-libri 1 \
|
17 |
+
--dynamic-chunk-training 1 \
|
18 |
+
--causal-convolution 1 \
|
19 |
+
--short-chunk-size 20 \
|
20 |
+
--num-left-chunks 4 \
|
21 |
+
--max-duration 300 \
|
22 |
+
--world-size 4 \
|
23 |
+
--start-epoch 1 \
|
24 |
+
--num-epochs 25
|
25 |
+
```
|
26 |
+
|
27 |
+
You can find the tensorboard log here <https://tensorboard.dev/experiment/rO04h6vjTLyw0qSxjp4m4Q>
|
28 |
+
|
29 |
+
### The decoding command is:
|
30 |
+
```bash
|
31 |
+
decoding_method="greedy_search" # "fast_beam_search", "modified_beam_search"
|
32 |
+
for chunk in 2 4 8 16; do
|
33 |
+
for left in 32 64; do
|
34 |
+
./pruned_transducer_stateless5/decode.py \
|
35 |
+
--num-encoder-layers 18 \
|
36 |
+
--dim-feedforward 2048 \
|
37 |
+
--nhead 8 \
|
38 |
+
--encoder-dim 512 \
|
39 |
+
--decoder-dim 512 \
|
40 |
+
--joiner-dim 512 \
|
41 |
+
--simulate-streaming 1 \
|
42 |
+
--decode-chunk-size ${chunk} \
|
43 |
+
--left-context ${left} \
|
44 |
+
--causal-convolution 1 \
|
45 |
+
--epoch 25 \
|
46 |
+
--avg 5 \
|
47 |
+
--exp-dir ./pruned_transducer_stateless5/exp \
|
48 |
+
--max-sym-per-frame 1 \
|
49 |
+
--max-duration 1000 \
|
50 |
+
--decoding-method ${decoding_method}
|
51 |
+
done
|
52 |
+
done
|
53 |
+
```
|
54 |
+
|
55 |
+
### export command is:
|
56 |
+
```bash
|
57 |
+
./pruned_transducer_stateless5/export.py \
|
58 |
+
--streaming-model 1 \
|
59 |
+
--causal-convolution 1 \
|
60 |
+
--num-encoder-layers 18 \
|
61 |
+
--dim-feedforward 2048 \
|
62 |
+
--nhead 8 \
|
63 |
+
--encoder-dim 512 \
|
64 |
+
--decoder-dim 512 \
|
65 |
+
--joiner-dim 512 \
|
66 |
+
--epoch 25 \
|
67 |
+
--avg 5 \
|
68 |
+
--exp-dir ./pruned_transducer_stateless5/exp
|
69 |
+
|
70 |
+
./pruned_transducer_stateless5/export.py \
|
71 |
+
--streaming-model 1 \
|
72 |
+
--causal-convolution 1 \
|
73 |
+
--num-encoder-layers 18 \
|
74 |
+
--dim-feedforward 2048 \
|
75 |
+
--nhead 8 \
|
76 |
+
--encoder-dim 512 \
|
77 |
+
--decoder-dim 512 \
|
78 |
+
--joiner-dim 512 \
|
79 |
+
--epoch 25 \
|
80 |
+
--avg 5 \
|
81 |
+
--exp-dir ./pruned_transducer_stateless5/exp \
|
82 |
+
--jit 1
|
83 |
+
```
|