Views
No views yet
opusTCv20210807_transformer-big_2022-08-10). This repository only republishes
an ONNX conversion of their weights; no model changes were made.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.>>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.>>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<<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).onnx.data / .onnx_data external-data files were produced for this export (all graphs stayed under the
2GB protobuf inline limit).1optimum-cli export onnx --model Helsinki-NLP/opus-mt-tc-big-itc-itc \
2 --task text2text-generation-with-past --no-post-process ./fp32onnxruntime.quantization.quantize_dynamic(weight_type=QUInt8) applied to each of the three graphs
independently, written to int8/.>>xxx<< token, PyTorch (MarianMTModel)
vs ONNX (ORTModelForSeq2SeqLM), num_beams=4, max_new_tokens=64, exact string match after decoding:1from transformers import AutoTokenizer
2from optimum.onnxruntime import ORTModelForSeq2SeqLM
3
4tok = AutoTokenizer.from_pretrained("TigreGotico/opus-mt-tc-big-itc-itc-onnx")
5model = ORTModelForSeq2SeqLM.from_pretrained("TigreGotico/opus-mt-tc-big-itc-itc-onnx")
6
7text = ">>spa<< O tempo está bom hoje."
8ids = model.generate(**tok(text, return_tensors="pt"), num_beams=4, max_new_tokens=64)
9print(tok.decode(ids[0], skip_special_tokens=True))
10# El tiempo está bueno hoy.subfolder="int8" instead.