marian-nmt / marian

Fast Neural Machine Translation in C++
https://marian-nmt.github.io
Other
1.22k stars 228 forks source link

compile to wasm #343

Closed lhk closed 3 years ago

lhk commented 3 years ago

Feature description

I would like to embed machine translation in my webapp. There is tensorflow.js but so far I've been unable to find suitable pretrained translation models.

Opus-MT hosts a large repository of pretrained models for many language pairs. It uses marian for the neural machine translation.

The pre- and postprocessing is cheap. I would be able to host the tokenizer on a server. But marian-decoder is too costly to host myself.
It would be great if it was possible to compile the code to webassembly and run it client-side.

I have written small projects in C/C++ and in principle would be happy to dig deeper. But guidance from someone with more experience would be really helpful.

Is this feasible at all?

kpu commented 3 years ago

Your request is well timed since Mozilla is working on this through my project https://browser.mt/. Let's take this over to https://github.com/browsermt/marian-dev and talk with @mlopatka and @abhi-agg.

Closing only because we'll discuss it in https://github.com/browsermt/marian-dev/issues/5