Davidsamuel101 commited on
Commit
e63b79b
·
verified ·
1 Parent(s): f9839a1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +23 -3
README.md CHANGED
@@ -21,11 +21,14 @@ Instead of being trained to predict sequences of words, this model was trained t
21
  This model was trained using [icefall](https://github.com/k2-fsa/icefall) framework. All training was done on 2 NVIDIA RTX 4090 GPUs. All necessary scripts used for training could be found in the [Files and versions](https://huggingface.co/bookbot/zipformer-streaming-robust-es-v0/tree/main) tab, as well as the [Training metrics](https://huggingface.co/bookbot/zipformer-streaming-robust-es-v0/tensorboard) logged via Tensorboard.
22
 
23
  ## Setup
 
24
  To set up all the necessary packages, please follow the installation instructions from the official icefall [documentation](https://icefall.readthedocs.io/en/latest/installation/index.html).
25
  When cloning the icefall repo, make sure to clone our fork of icefall `git clone https://github.com/bookbot-hive/icefall` instead of the original.
26
 
27
  ### Download Pre-trained Model
 
28
  Once you've installed all the necessary packages, follow the steps below
 
29
  ```sh
30
  cd egs/bookbot_es/ASR
31
  mkdir tmp
@@ -43,7 +46,7 @@ cd ..
43
  for m in greedy_search fast_beam_search modified_beam_search; do
44
  ./zipformer/streaming_decode.py \
45
  --epoch 80 \
46
- --avg 3 \
47
  --causal 1 \
48
  --num-encoder-layers 2,2,2,2,2,2 \
49
  --feedforward-dim 512,768,768,768,768,768 \
@@ -165,11 +168,13 @@ export CUDA_VISIBLE_DEVICES="0,1"
165
  ```
166
 
167
  ### Exporting to ONNX
 
168
  To export the trained model to onnx run:
 
169
  ```
170
  ./zipformer/export-onnx-streaming.py \
171
  --tokens data/lang_phone/tokens.txt \
172
- --avg 3 \
173
  --causal 1 \
174
  --exp-dir tmp/zipformer-streaming-robust-es-v0 \
175
  --num-encoder-layers 2,2,2,2,2,2 \
@@ -181,14 +186,29 @@ To export the trained model to onnx run:
181
  --use-transducer True \
182
  --epoch 80 \
183
  ```
 
184
  It will store the ONNX files inside the specified `exp-dir`.
185
 
186
  ### Converting ONNX to ORT
 
187
  ```
188
  cd tmp/zipformer-streaming-robust-es-v0
189
  python -m onnxruntime.tools.convert_onnx_models_to_ort --optimization_style=Fixed .
190
  ```
191
- Upon running the code above, it will store the model in the ORT format along with the efficient int8 quantized version of the model.
 
 
 
 
 
 
 
 
 
 
 
 
 
192
 
193
  ## Frameworks
194
 
 
21
  This model was trained using [icefall](https://github.com/k2-fsa/icefall) framework. All training was done on 2 NVIDIA RTX 4090 GPUs. All necessary scripts used for training could be found in the [Files and versions](https://huggingface.co/bookbot/zipformer-streaming-robust-es-v0/tree/main) tab, as well as the [Training metrics](https://huggingface.co/bookbot/zipformer-streaming-robust-es-v0/tensorboard) logged via Tensorboard.
22
 
23
  ## Setup
24
+
25
  To set up all the necessary packages, please follow the installation instructions from the official icefall [documentation](https://icefall.readthedocs.io/en/latest/installation/index.html).
26
  When cloning the icefall repo, make sure to clone our fork of icefall `git clone https://github.com/bookbot-hive/icefall` instead of the original.
27
 
28
  ### Download Pre-trained Model
29
+
30
  Once you've installed all the necessary packages, follow the steps below
31
+
32
  ```sh
33
  cd egs/bookbot_es/ASR
34
  mkdir tmp
 
46
  for m in greedy_search fast_beam_search modified_beam_search; do
47
  ./zipformer/streaming_decode.py \
48
  --epoch 80 \
49
+ --avg 5 \
50
  --causal 1 \
51
  --num-encoder-layers 2,2,2,2,2,2 \
52
  --feedforward-dim 512,768,768,768,768,768 \
 
168
  ```
169
 
170
  ### Exporting to ONNX
171
+
172
  To export the trained model to onnx run:
173
+
174
  ```
175
  ./zipformer/export-onnx-streaming.py \
176
  --tokens data/lang_phone/tokens.txt \
177
+ --avg 5 \
178
  --causal 1 \
179
  --exp-dir tmp/zipformer-streaming-robust-es-v0 \
180
  --num-encoder-layers 2,2,2,2,2,2 \
 
186
  --use-transducer True \
187
  --epoch 80 \
188
  ```
189
+
190
  It will store the ONNX files inside the specified `exp-dir`.
191
 
192
  ### Converting ONNX to ORT
193
+
194
  ```
195
  cd tmp/zipformer-streaming-robust-es-v0
196
  python -m onnxruntime.tools.convert_onnx_models_to_ort --optimization_style=Fixed .
197
  ```
198
+
199
+ Upon running the code above, it will convert the ONNX files to the ORT format along with the efficient int8 quantized versions. The following files will be generated:
200
+
201
+ **Standard ORT files:**
202
+
203
+ - `encoder-epoch-80-avg-5-chunk-16-left-128.ort`
204
+ - `decoder-epoch-80-avg-5-chunk-16-left-128.ort`
205
+ - `joiner-epoch-80-avg-5-chunk-16-left-128.ort`
206
+
207
+ **INT8 Quantized ORT files:**
208
+
209
+ - `encoder-epoch-80-avg-5-chunk-16-left-128.int8.ort`
210
+ - `decoder-epoch-80-avg-5-chunk-16-left-128.int8.ort`
211
+ - `joiner-epoch-80-avg-5-chunk-16-left-128.int8.ort`
212
 
213
  ## Frameworks
214