Skip to content

Support Paraformer ASR model exporting to OpenVINO.#1582

Open
10vliu13 wants to merge 1 commit intohuggingface:mainfrom
10vliu13:export-paraformer
Open

Support Paraformer ASR model exporting to OpenVINO.#1582
10vliu13 wants to merge 1 commit intohuggingface:mainfrom
10vliu13:export-paraformer

Conversation

@10vliu13
Copy link

This PR would like to support Paraformer ASR model exporting to OpenVINO. The command to export to OpenVINO is showed in below:

cmd: optimum-cli export openvino --trust-remote-code --model funasr/paraformer-zh paraformer-zh

Please have a review and comment. Thanks

Copy link
Collaborator

@rkazants rkazants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to implement inference part.
Please use API we have already implemented for SpeechT5 TTS model

super(LayerNorm, self).__init__(nout, eps=1e-12)
self.dim = dim

class BaseTransformerDecoder(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@10vliu13 we shouldn't add a modeling code in optimum-intel, we can instead add export support via export_from_model


when the model is already loaded using funasr for example. If we want to show users how to export their model, adding a script should be enough (the number of downloads for this architecture seems too low to add model loading via TasksManager.get_model_from_task)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems SpeechT5 TTS model also a example to uses export_from_model. I will refers to SpeechT5 TTS model code flow and reimplement my patch. Thanks for the comment.

@10vliu13
Copy link
Author

SpeechT5

I would like to confirm that the @rkazants want me to refer to the API in the below link to provide inference part. Thanks

https://github.com/huggingface/optimum-intel/blob/main/optimum/intel/openvino/modeling_text2speech.py#L159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants