Test int8 models (#107)

* Test int8 models

* Fix displaying help messages

* small fixes

* Fix jni test
This commit is contained in:
Fangjun Kuang
2023-03-31 22:34:10 +08:00
committed by GitHub
parent c0620a1fe1
commit f9f9f20d37
7 changed files with 296 additions and 175 deletions

View File

@@ -25,6 +25,7 @@ log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \
@@ -37,6 +38,16 @@ time $EXE \
$repo/test_wavs/1.wav \
$repo/test_wavs/8k.wav
time $EXE \
--tokens=$repo/tokens.txt \
--encoder=$repo/encoder-epoch-99-avg-1.int8.onnx \
--decoder=$repo/decoder-epoch-99-avg-1.int8.onnx \
--joiner=$repo/joiner-epoch-99-avg-1.int8.onnx \
--num-threads=2 \
$repo/test_wavs/0.wav \
$repo/test_wavs/1.wav \
$repo/test_wavs/8k.wav
rm -rf $repo
log "------------------------------------------------------------"
@@ -51,6 +62,7 @@ log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \
@@ -63,6 +75,16 @@ time $EXE \
$repo/test_wavs/1.wav \
$repo/test_wavs/8k.wav
time $EXE \
--tokens=$repo/tokens.txt \
--encoder=$repo/encoder-epoch-99-avg-1.int8.onnx \
--decoder=$repo/decoder-epoch-99-avg-1.int8.onnx \
--joiner=$repo/joiner-epoch-99-avg-1.int8.onnx \
--num-threads=2 \
$repo/test_wavs/0.wav \
$repo/test_wavs/1.wav \
$repo/test_wavs/8k.wav
rm -rf $repo
log "------------------------------------------------------------"
@@ -77,6 +99,7 @@ log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \
@@ -89,4 +112,14 @@ time $EXE \
$repo/test_wavs/2.wav \
$repo/test_wavs/8k.wav
time $EXE \
--tokens=$repo/tokens.txt \
--paraformer=$repo/model.int8.onnx \
--num-threads=2 \
--decoding-method=greedy_search \
$repo/test_wavs/0.wav \
$repo/test_wavs/1.wav \
$repo/test_wavs/2.wav \
$repo/test_wavs/8k.wav
rm -rf $repo