Commit
·
6a65851
1
Parent(s):
8383e9e
add models
Browse files- export-onnx.py +7 -2
- model.int8.onnx +2 -2
- model.onnx +1 -1
- test_wavs/en.wav +0 -0
- test_wavs/ja.wav +0 -0
- test_wavs/ko.wav +0 -0
- test_wavs/yue.wav +0 -0
- test_wavs/zh.wav +0 -0
export-onnx.py
CHANGED
@@ -162,7 +162,9 @@ def main():
|
|
162 |
"neg_mean": neg_mean,
|
163 |
"inv_stddev": inv_stddev,
|
164 |
"model_type": "sense_voice_ctc",
|
165 |
-
|
|
|
|
|
166 |
"model_author": "iic",
|
167 |
"maintainer": "k2-fsa",
|
168 |
"vocab_size": vocab_size,
|
@@ -185,7 +187,10 @@ def main():
|
|
185 |
model_input=filename,
|
186 |
model_output=filename_int8,
|
187 |
op_types_to_quantize=["MatMul"],
|
188 |
-
|
|
|
|
|
|
|
189 |
)
|
190 |
|
191 |
|
|
|
162 |
"neg_mean": neg_mean,
|
163 |
"inv_stddev": inv_stddev,
|
164 |
"model_type": "sense_voice_ctc",
|
165 |
+
# version 1: Use QInt8
|
166 |
+
# version 2: Use QUInt8
|
167 |
+
"version": "2",
|
168 |
"model_author": "iic",
|
169 |
"maintainer": "k2-fsa",
|
170 |
"vocab_size": vocab_size,
|
|
|
187 |
model_input=filename,
|
188 |
model_output=filename_int8,
|
189 |
op_types_to_quantize=["MatMul"],
|
190 |
+
# Note that we have to use QUInt8 here.
|
191 |
+
#
|
192 |
+
# When QInt8 is used, C++ onnxruntime produces incorrect results
|
193 |
+
weight_type=QuantType.QUInt8,
|
194 |
)
|
195 |
|
196 |
|
model.int8.onnx
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c71f0ce00bec95b07744e116345e33d8cbbe08cef896382cf907bf4b51a2cd51
|
3 |
+
size 239233841
|
model.onnx
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 937617178
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:977016bd9c79f9eb343430b5cc305e07ab64d5212dff41b0dcfa1694bee9a8cb
|
3 |
size 937617178
|
test_wavs/en.wav
CHANGED
Binary files a/test_wavs/en.wav and b/test_wavs/en.wav differ
|
|
test_wavs/ja.wav
CHANGED
Binary files a/test_wavs/ja.wav and b/test_wavs/ja.wav differ
|
|
test_wavs/ko.wav
CHANGED
Binary files a/test_wavs/ko.wav and b/test_wavs/ko.wav differ
|
|
test_wavs/yue.wav
CHANGED
Binary files a/test_wavs/yue.wav and b/test_wavs/yue.wav differ
|
|
test_wavs/zh.wav
CHANGED
Binary files a/test_wavs/zh.wav and b/test_wavs/zh.wav differ
|
|