Downloads · 30 days
111
28% of all-time downloads
huggingworld/m2m100_418M
m2m100_418M is a translation model from huggingworld. Use it when you need text moved from one language to another. It is set up for transformers.js. The card lists the license as mit.
https://huggingface.co/facebook/m2m100418M with ONNX weights to be compatible with Transformers.js.
Downloads · 30 days
111
28% of all-time downloads
All-time downloads
390
Public
Repo size
634 MB
Likes
0
Public
Click a slice to open those files.
.onnx632 MB · 98%
From the Hugging Face model README
https://huggingface.co/facebook/m2m100_418M with ONNX weights to be compatible with Transformers.js.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
You can then perform multilingual translation like this:
import { pipeline } from '@huggingface/transformers';
// Create a translation pipeline
const translator = await pipeline('translation', 'huggingworld/m2m100_418M');
// Translate text from Hindi to French
const output = await translator('जीवन एक चॉकलेट बॉक्स की तरह है।', {
src_lang: 'hi', // Hindi
tgt_lang: 'fr', // French
});
console.log(output);
// [{ translation_text: 'La vie est comme une boîte à chocolat.' }]
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).