Downloads · 30 days
12
22% of all-time downloads
TigreGotico/opus-mt-tc-big-itc-itc-onnx
opus-mt-tc-big-itc-itc-onnx is a translation model from TigreGotico. 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-4.0.
ONNX export of Helsinki-NLP/opus-mt-tc-big-itc-itc, a larger (transformer-big) MarianMT model translating between Italic languages: Asturian, Catalan, Spanish, French, Galician, Italian, Ladino, Occitan, Piedmontese,…
Downloads · 30 days
12
22% of all-time downloads
All-time downloads
54
Public
Repo size
2.2 GB
Likes
0
Public
Click a slice to open those files.
.onnx2.2 GB · 100%
From the Hugging Face model README
ONNX export of Helsinki-NLP/opus-mt-tc-big-itc-itc, a larger (transformer-big) MarianMT model translating between Italic languages: Asturian, Catalan, Spanish, French, Galician, Italian, Ladino, Occitan, Piedmontese, Portuguese, Romanian.
Licence: cc-by-4.0 (verbatim from the upstream model card).
Attribution: model trained and published by Helsinki-NLP / University of Helsinki, OPUS-MT / Tatoeba
Translation Challenge project (opusTCv20210807_transformer-big_2022-08-10). This repository only republishes
an ONNX conversion of their weights; no model changes were made.
Same routing gap as opus-mt-itc-itc-onnx — direct
Iberian pivots (pt→es, es→pt, ca→es, pt→ca) without going through English — but from the larger, generally
higher-quality tc-big training run.
This is a multilingual, many-to-many model. The target language is selected by a >>xxx<< token
prepended to the input text — transformers/optimum does not add this automatically. Omitting it does
not raise an error: the model silently produces fluent text in an unpredictable language.
Example: >>spa<< O tempo está bom hoje. → El tiempo está bueno hoy. (Portuguese → Spanish)
>>acf<< >>aoa<< >>arg<< >>ast<< >>cat<< >>cbk<< >>cbk_Latn<< >>ccd<< >>cks<< >>cos<< >>cri<< >>crs<< >>dlm<<
>>drc<< >>egl<< >>ext<< >>fab<< >>fax<< >>fra<< >>frc<< >>frm<< >>frm_Latn<< >>fro<< >>fro_Latn<< >>frp<<
>>fur<< >>fur_Latn<< >>gcf<< >>gcf_Latn<< >>gcr<< >>glg<< >>hat<< >>idb<< >>ist<< >>ita<< >>itk<< >>kea<<
>>kmv<< >>lad<< >>lad_Latn<< >>lat<< >>lat_Grek<< >>lat_Latn<< >>lij<< >>lld<< >>lld_Latn<< >>lmo<< >>lou<<
>>mcm<< >>mfe<< >>mol<< >>mwl<< >>mxi<< >>mzs<< >>nap<< >>nrf<< >>oci<< >>osc<< >>osp<< >>osp_Latn<< >>pap<<
>>pcd<< >>pln<< >>pms<< >>pob<< >>por<< >>pov<< >>pre<< >>pro<< >>qbb<< >>qhr<< >>rcf<< >>rgn<< >>roh<< >>ron<<
>>ruo<< >>rup<< >>ruq<< >>scf<< >>scn<< >>sdc<< >>sdn<< >>spa<< >>spq<< >>spx<< >>src<< >>srd<< >>sro<< >>tmg<<
>>tvy<< >>vec<< >>vkp<< >>wln<< >>xfa<< >>xum<<
(source: upstream model card "Valid Target Language Labels" list, verified against the exported tokenizer
vocabulary.) The core, well-supported languages are: ast cat fra gcf glg hat ita lad lad_Latn lat lat_Latn oci por ron spa.
encoder_model.onnx, decoder_model.onnx, decoder_with_past_model.onnx (fp32, repo root)
source.spm, target.spm, vocab.json, tokenizer_config.json, special_tokens_map.json, config.json, generation_config.json
int8/
encoder_model.onnx, decoder_model.onnx, decoder_with_past_model.onnx (dynamic QUInt8 quantization)
(+ copies of the tokenizer files)
No .onnx.data / .onnx_data external-data files were produced for this export (all graphs stayed under the
2GB protobuf inline limit).
optimum-cli export onnx --model Helsinki-NLP/opus-mt-tc-big-itc-itc \
--task text2text-generation-with-past --no-post-process ./fp32
int8: onnxruntime.quantization.quantize_dynamic(weight_type=QUInt8) applied to each of the three graphs
independently, written to int8/.
8 sentences covering pt→es, es→pt, ca→es, pt→ca, each with the correct >>xxx<< token, PyTorch (MarianMTModel)
vs ONNX (ORTModelForSeq2SeqLM), num_beams=4, max_new_tokens=64, exact string match after decoding:
from transformers import AutoTokenizer
from optimum.onnxruntime import ORTModelForSeq2SeqLM
tok = AutoTokenizer.from_pretrained("TigreGotico/opus-mt-tc-big-itc-itc-onnx")
model = ORTModelForSeq2SeqLM.from_pretrained("TigreGotico/opus-mt-tc-big-itc-itc-onnx")
text = ">>spa<< O tempo está bom hoje."
ids = model.generate(**tok(text, return_tensors="pt"), num_beams=4, max_new_tokens=64)
print(tok.decode(ids[0], skip_special_tokens=True))
# El tiempo está bueno hoy.
For int8, pass subfolder="int8" instead.