Instructions to use akm9191/opus-mt-en-ml-int8-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use akm9191/opus-mt-en-ml-int8-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('translation', 'akm9191/opus-mt-en-ml-int8-onnx');
opus-mt-en-ml (int8 ONNX)
English โ Malayalam machine translation. This is an int8-quantised ONNX export of
Helsinki-NLP/opus-mt-en-ml (commit c31fa33320302c9cacd561792bb0d6b27d116cf4),
made for on-device, offline translation in the Daily Whisper Android notes app.
The model weights are the work of the Language Technology Research Group at the University of Helsinki (OPUS-MT, Jรถrg Tiedemann et al.), released under the Apache License 2.0. This repo only changes the file format; it is redistributed under the same licence. No fine-tuning or training was done.
Original model
- model: transformer-align (MarianMT), dataset: opus+bt+bt (2020-04-28)
- pre-processing: normalization + SentencePiece
- upstream benchmark (Tatoeba.en.ml): BLEU 19.1. Int8 quantisation may lower quality slightly; not re-benchmarked.
Files
The layout matches the Xenova/opus-mt-* repos, so it works with transformers.js-style loaders.
| file | bytes | sha256 |
|---|---|---|
onnx/encoder_model_quantized.onnx |
32,271,107 | 43276f6a5e69efa0377b82adc9dff0ae018be340c4f4a179b6cd74e0d66f5365 |
onnx/decoder_model_merged_quantized.onnx |
51,980,871 | ed69a7e5e7461fb3029c1aadc254fedaee9abdc1c5a462002b51dcbce2740be1 |
tokenizer.json |
1,022,410 | f129181a0e41b62c67b44e5d0bcb4585e9a6edfa5748f2043e5fada2e6e27068 |
config.json |
1,391 | 5fc9dab47f3453afa6d064e13433b4e836a3a71cbf4da84db8ec29486cd08949 |
How it was made
- Exported to ONNX with Hugging Face Optimum 1.23.3 (task
text2text-generation-with-past, transformers 4.46.3, torch 2.5.1), producingencoder_model.onnxanddecoder_model_merged.onnx(decoder with KV cache, merged with anuse_cache_branchswitch). - Quantised with ONNX Runtime 1.28.0
quantize_dynamic(weight type QInt8, per-channel, reduce_range). tokenizer.jsongenerated from the Marian SentencePiece vocab with the transformers.js Marian converter;config.jsoncopied from upstream (generation defaults max_length, num_beams, bad_words_ids kept in it, as in the Xenova repos).
Known limitations
- Same as the upstream model: trained on OPUS data, short sentences work best, quality varies by domain.
- Malayalam text mixed with English words (code-mixed / "Manglish") translates poorly.
- Not suitable for high-stakes translation.
Citation
@InProceedings{TiedemannThottingal:EAMT2020,
author = {J{\"o}rg Tiedemann and Santhosh Thottingal},
title = {{OPUS-MT} โ {B}uilding open translation services for the {W}orld},
booktitle = {Proceedings of the 22nd Annual Conference of the European Association for Machine Translation (EAMT)},
year = {2020},
address = {Lisbon, Portugal}
}
- Downloads last month
- 151
Model tree for akm9191/opus-mt-en-ml-int8-onnx
Base model
Helsinki-NLP/opus-mt-en-ml