https://huggingface.co/facebook/m2m100_418M with ONNX weights to be compatible with Transformers.js.

Usage (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).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for huggingworld/m2m100_418M

Quantized
(1)
this model

Space using huggingworld/m2m100_418M 1