FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
6.16k stars 661 forks source link

[HELP] How to export llm.pt to onnx? #192

Open hello2mao opened 3 months ago

sirius-ai commented 3 months ago

And how to fix the onnx input length while the text_encoder not output a fixed length token?

aluminumbox commented 3 months ago

we export llm.pt to libtorch in our production system, but this export code is not opensourced yet, we will consider it later

sirius-ai commented 3 months ago

we export llm.pt to libtorch in our production system, but this export code is not opensourced yet, we will consider it later

is the export model has fixed input length?

hello2mao commented 3 months ago

A simple Time Cost Test Result:

llm encoder cost: 5.93s
llm decoder cost: 0.17s
llm forward_chunk cost: 6.11s
llm cost: 6.11s
flow cost: 0.68s 
hift cost: 0.06s 
total cost: 6.98s

Any way to reduce the llm encoder time cost ?(about 82% of total time)

aluminumbox commented 3 months ago

A simple Time Cost Test Result:

llm encoder cost: 5.93s
llm decoder cost: 0.17s
llm forward_chunk cost: 6.11s
llm cost: 6.11s
flow cost: 0.68s 
hift cost: 0.06s 
total cost: 6.98s

Any way to reduce the llm encoder time cost ?(about 82% of total time)

llm encoder generates token one by one, we are also trying to reduce its computation time, maybe export to onnx or libtorch will reduce computation

zdj97 commented 2 months ago

we export llm.pt to libtorch in our production system, but this export code is not opensourced yet, we will consider it later

Hi, when would you update codes converting .pt to .onnx or libtorch? Thanks