From add315bdb35e09fe705d4eab39e4d2386734f4ae Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 17 三月 2023 15:50:51 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add
---
funasr/runtime/python/libtorch/torch_paraformer/paraformer_bin.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/funasr/runtime/python/libtorch/torch_paraformer/paraformer_bin.py b/funasr/runtime/python/libtorch/torch_paraformer/paraformer_bin.py
index 3545ccf..d47135a 100644
--- a/funasr/runtime/python/libtorch/torch_paraformer/paraformer_bin.py
+++ b/funasr/runtime/python/libtorch/torch_paraformer/paraformer_bin.py
@@ -24,12 +24,16 @@
device_id: Union[str, int] = "-1",
plot_timestamp_to: str = "",
pred_bias: int = 1,
+ quantize: bool = False,
+ intra_op_num_threads: int = 1,
):
if not Path(model_dir).exists():
raise FileNotFoundError(f'{model_dir} does not exist.')
model_file = os.path.join(model_dir, 'model.torchscripts')
+ if quantize:
+ model_file = os.path.join(model_dir, 'model_quant.torchscripts')
config_file = os.path.join(model_dir, 'config.yaml')
cmvn_file = os.path.join(model_dir, 'am.mvn')
config = read_yaml(config_file)
--
Gitblit v1.9.1