huggingface / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
12.2k stars 776 forks source link

[Model Request] mT5, mBART, NLLB #39

Closed kkimdev closed 1 year ago

kkimdev commented 1 year ago

These are models that support a wider range of languages.

Btw, very cool project, thanks!

xenova commented 1 year ago

Thanks! Fortunately, these models should be quite simple to add (since a lot of their functionality is shared with existing models). I'll see if I can get a working version by the end of today. I'm also planning on getting blenderbot working (#29, #37).

Will keep you updated :)

xenova commented 1 year ago

Busy working on this, but do you know how to use those models using HF's pipeline function? I can't quite seem to find a guide.

xenova commented 1 year ago

mT5 is now supported (https://github.com/xenova/transformers.js/commit/4e967885b8f5bdcf1c5bbd36ad04c93ba27f3438). A new version release will come soon (and then you can use it from the library).

However, please note that the google/mt5-small model has NOT been finetuned on downstream tasks like translation.

This means that you would need to finetune a model if you want to perform translation (or something else). For more information, check out this issue: