Instructions to use adamnaciri/tarjama-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use adamnaciri/tarjama-models with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('translation', 'adamnaciri/tarjama-models');
Tarjama models
Browser-ready models used by Tarjama (live translation of the Friday khutba from Arabic into Italian, English or French). They run on the CPU in Chrome with onnxruntime-web and transformers.js.
| Folder | Model | Source | License |
|---|---|---|---|
fastconformer-ar/ |
Arabic speech recognition, CTC, ONNX int8 (MatMul only, per channel, reduced range) | NVIDIA stt_ar_fastconformer_hybrid_large_pcd_v1.0, exported and quantized by Tarjama | CC-BY-4.0, ยฉ NVIDIA |
opus-mt-tc-bible-big-afa-fra_ita_por_spa/ |
Arabic โ Italian translation (prefix >>ita<< ), ONNX q8 |
Helsinki-NLP/opus-mt-tc-bible-big-afa-fra_ita_por_spa, converted with the transformers.js scripts | Apache-2.0, ยฉ Helsinki-NLP |
opus-mt-ar-it-ort/ |
Lighter Arabic โ Italian translation (used on phones), q8 | Helsinki-NLP/opus-mt-ar-it, converted with the transformers.js scripts | Apache-2.0, ยฉ Helsinki-NLP |
opus-mt-ar-en/, opus-mt-ar-en-ort/ |
Arabic โ English translation, q8 | Helsinki-NLP/opus-mt-ar-en, ONNX conversion by Xenova | Apache-2.0, ยฉ Helsinki-NLP |
opus-mt-ar-fr/, opus-mt-ar-fr-ort/ |
Arabic โ French translation, q8 | Helsinki-NLP/opus-mt-ar-fr, converted with the transformers.js scripts | Apache-2.0, ยฉ Helsinki-NLP |
fastconformer-ar/model.int8.ort and the *-ort/ folders hold the same models in ONNX Runtime's ORT format (optimization level "extended"; the translation files keep their .onnx names for transformers.js). The web app loads them with the weights used in place, which roughly halves the memory; the output is identical.
Changes from the originals: format conversion (ONNX, ORT) and weight quantization only.