Downloads · 30 days
15.3K
12% of all-time downloads
Xenova/nllb-200-distilled-600M
nllb-200-distilled-600M is a translation model from Xenova. 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 cc-by-nc-4.0.
https://huggingface.co/facebook/nllb-200-distilled-600M with ONNX weights to be compatible with Transformers.js.
Downloads · 30 days
15.3K
12% of all-time downloads
All-time downloads
127K
Public
Repo size
112 GB
Likes
55
Public
Click a slice to open those files.
.onnx34.2 GB · 100%
From the Hugging Face model README
https://huggingface.co/facebook/nllb-200-distilled-600M 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', 'Xenova/nllb-200-distilled-600M');
// Translate text from Hindi to French
const output = await translator('जीवन एक चॉकलेट बॉक्स की तरह है।', {
src_lang: 'hin_Deva', // Hindi
tgt_lang: 'fra_Latn', // French
});
console.log(output);
// [{ translation_text: 'La vie est comme une boîte à chocolat.' }]
See here for the full list of languages and their corresponding codes.
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).