Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline machine translation with MarianMT #107

Open
flutter-painter opened this issue Sep 8, 2024 · 0 comments
Open

Offline machine translation with MarianMT #107

flutter-painter opened this issue Sep 8, 2024 · 0 comments

Comments

@flutter-painter
Copy link

Hi @lijy91,

Thank you for sharing such a great flutter tool !
Is offline machine translation in your roadmap ?
By this I mean giving users the possibility to select a model on their machines and to use it for translations.
Assuming this is something you are also interested in...
For easier Dart integration I would recommend MarianMT which weigh little and run on small CPU.
I see three possible approaches :

  1. Build on top of bergamot-translator C++ using FFI
  2. Build on top of candle rust using rinf
  3. Build a dedicated Dart onnx runtime for MarianMT

Approach n°1 is light and simple but it would limit models to those available through the Bergamote project, eg :
English, Czech, German, Spanish, Estonian, Norwegian B., Norwegian N., Bulgarian, Polish and French

Approach n°2 is heavy ; it means adding Rust to biyi and building rinf interface, yet all MarianMT models would be available for offline translation

Approach n°3 is tedious, it means building an API on top of onnxruntime_flutter or fonnx and also convert MarianMT models to ONNX

What do you think ?

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

No branches or pull requests

1 participant