chi-vi/hirashiba-mt-tiny-zh-vi-onnx
By chi-vi · ↓ 6 · ♥ 2 · Updated 2025-03-02
What's in this repo
This page lists the files in chi-vi/hirashiba-mt-tiny-zh-vi-onnx, including decoder_model.onnx, decoder_model_merged.onnx, decoder_with_past_model.onnx and more.
- 4 ONNX models (.onnx files)
- 13 files, including 5 .json, 4 .onnx, 2 .spm, 1 .md
- Last updated 2025-03-02
ONNX files
| File | Size | Download |
|---|---|---|
| decoder_model.onnx | — | Download |
| decoder_model_merged.onnx | — | Download |
| decoder_with_past_model.onnx | — | Download |
| encoder_model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
How to run:
import torch
import time
from transformers import AutoTokenizer, pipeline
from optimum.onnxruntime import ORTModelForSeq2SeqLM
model = ORTModelForSeq2SeqLM.from_pretrained("chi-vi/hirashiba-mt-tiny-zh-vi-onnx")
tokenizer = AutoTokenizer.from_pretrained("chi-vi/hirashiba-mt-tiny-zh-vi-onnx")
with open("test.txt") as f:
text = f.readlines()
start_time = time.time()
pipe = pipeline("translation", model=model, tokenizer=tokenizer, device=0)
result = pipe(text)
print(result)
print("--- %s seconds ---" % (time.time() - start_time))
Model info
onnx
marian
translation
vi
zh
license:mpl-2.0
region:us
↓ 6
♥ 2
Created: 2025-03-02
Updated: 2025-03-02
View on Hugging FaceFiles (13)
.gitattributes
README.md
config.json
decoder_model.onnx
ONNX
decoder_model_merged.onnx
ONNX
decoder_with_past_model.onnx
ONNX
encoder_model.onnx
ONNX
generation_config.json
source.spm
special_tokens_map.json
target.spm
tokenizer_config.json
vocab.json