|
@@ -346,6 +346,8 @@ def inference_modelscope(
|
|
|
**kwargs,
|
|
**kwargs,
|
|
|
):
|
|
):
|
|
|
assert check_argument_types()
|
|
assert check_argument_types()
|
|
|
|
|
+ ncpu = kwargs.get("ncpu", 1)
|
|
|
|
|
+ torch.set_num_threads(ncpu)
|
|
|
if batch_size > 1:
|
|
if batch_size > 1:
|
|
|
raise NotImplementedError("batch decoding is not implemented")
|
|
raise NotImplementedError("batch decoding is not implemented")
|
|
|
if word_lm_train_config is not None:
|
|
if word_lm_train_config is not None:
|