Downloads · 30 days
21
18% of all-time downloads
R4kSo1997/opus-mt-pt-en-onnx-int8
opus-mt-pt-en-onnx-int8 is a translation model from R4kSo1997. Use it when you need text moved from one language to another. The card lists the license as cc-by-4.0.
ONNX export with dynamic int8 quantization (AVX2) of Helsinki-NLP/opus-mt-roa-en (Romance languages → English; covers Portuguese among others).
Downloads · 30 days
21
18% of all-time downloads
All-time downloads
119
Public
Repo size
237 MB
Likes
0
Public
Click a slice to open those files.
.onnx235 MB · 98%
From the Hugging Face model README
ONNX export with dynamic int8 quantization (AVX2) of
Helsinki-NLP/opus-mt-roa-en
(Romance languages → English; covers Portuguese among others).
encoder_model_quantized.onnxdecoder_model_quantized.onnxdecoder_with_past_model_quantized.onnx (KV-cache decoder)tokenizer.json (Unigram, derived from merged vocab.json + source.spm/target.spm scores)source.spm, target.spm, vocab.json, config.json, generation_config.jsonfrom optimum.onnxruntime import ORTModelForSeq2SeqLM
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-roa-en")
model = ORTModelForSeq2SeqLM.from_pretrained(
"R4kSo1997/opus-mt-pt-en-onnx-int8",
encoder_file_name="encoder_model_quantized.onnx",
decoder_file_name="decoder_model_quantized.onnx",
decoder_with_past_file_name="decoder_with_past_model_quantized.onnx",
)
out = model.generate(**tok("Olá, como vai?", return_tensors="pt"), num_beams=4)
print(tok.batch_decode(out, skip_special_tokens=True))
Inherits CC-BY-4.0 from the upstream Helsinki-NLP model.