diff --git a/convert_torch2paddle.py b/convert_torch2paddle.py deleted file mode 100644 index b13a793a8..000000000 --- a/convert_torch2paddle.py +++ /dev/null @@ -1,18 +0,0 @@ -import paddle -import torch - -torch_model_dict = torch.load('large-v3-turbo.pt')['model_state_dict'] - -paddle_model_state_dict = {} -for key, val in torch_model_dict.items(): - if key.endswith( - 'weight' - ) and val.ndim == 2 and key != "decoder.token_embedding.weight": - val = val.T - paddle_model_state_dict[key] = paddle.to_tensor( - val.cpu().numpy()).astype("float32") - -# add other params in case if need, such as: -paddle_model_state_dict['dims'] = torch.load('large-v3-turbo.pt')['dims'] - -paddle.save(paddle_model_state_dict, 'weights.params') diff --git a/paddlespeech/cli/whisper/infer.py b/paddlespeech/cli/whisper/infer.py index 7207d7467..822ae2549 100644 --- a/paddlespeech/cli/whisper/infer.py +++ b/paddlespeech/cli/whisper/infer.py @@ -75,7 +75,7 @@ class WhisperExecutor(BaseExecutor): '--size', type=str, default='large', - choices=['large', 'medium', 'base', 'small', 'tiny'], + choices=['large', 'medium', 'base', 'small', 'tiny', 'turbo'], help='Choose model size. now only support large, large:[whisper-large-16k]' ) self.parser.add_argument(