facebookresearch / seamless_communication

Foundational Models for State-of-the-Art Speech and Text Translation
Other
10.51k stars 1.02k forks source link

Deployment of Seamless M4T Model - Exporting text.decoder to ONNX or Using torch.jit.trace #460

Open HesamAlavian opened 1 month ago

HesamAlavian commented 1 month ago

Description

I am currently working on deploying the Seamless M4T model for text-to-text translation on a Triton server. I have successfully exported the text.encoder to ONNX and traced it using torch.jit.trace. However, I am encountering issues when trying to export the text.decoder to ONNX or trace it using torch.jit.trace. The process is being blocked by IncrementalStateBag.

Steps to Reproduce

  1. Exporting text.encoder:

    • Successfully exported to ONNX.
    • Successfully traced using torch.jit.trace.
  2. Exporting text.decoder:

    • Attempted to export to ONNX.
    • Attempted to trace using torch.jit.trace.
    • Encountered an issue with IncrementalStateBag.

Observed Behavior

Expected Behavior

Environment

Questions and Assistance Needed

  1. Is there a recommended approach to handle IncrementalStateBag when exporting or tracing the text.decoder?
  2. Are there any workarounds or specific configurations that I should consider to successfully export the text.decoder?
  3. Has anyone successfully deployed the Seamless M4T model on Triton server, and if so, could you provide guidance or a reference implementation?

Any assistance or guidance on this matter would be greatly appreciated. Thank you!


Additional Information

Please let me know if there is any additional information required to diagnose the issue.

Thank you for your support!