π VGT ONNX Model Hub
Welcome to the VGT (Vaishal's Global Translator) ONNX Model Hub β a large-scale open-source collection of ~1,000+ pretrained models converted to ONNX for blazing fast inference, research, and production deployment.
This hub brings together models from leading open-source projects (like Helsinki-NLP MarianMT) and makes them universally accessible via ONNX.
β¨ Key highlights:
- β 1,000+ ONNX models for translation, NLP, and beyond
- β Plug-and-play with Hugging Face tokenizers
- β Optimized for fast inference with ONNX Runtime
- β Easy to fetch programmatically (no manual downloads!)
- β Fully open-source, respecting original licenses
π Browse the complete catalog here: yet to add
π Repository Structure
Each model lives in its own folder, for example:
Helsinki-NLP-opus-mt-tc-base-bat-zle/
βββ config.json
βββ decoder_model.onnx
βββ decoder_model_merged.onnx
βββ decoder_with_past_model.onnx
βββ encoder_model.onnx
βββ generation_config.json
βββ source.spm
βββ target.spm
βββ special_tokens_map.json
βββ tokenizer_config.json
βββ vocab.json
File breakdown:
- encoder_model.onnx β encoder graph
- decoder_model.onnx β base decoder
- decoder_model_merged.onnx β optimized decoder (recommended for speed)
- decoder_with_past_model.onnx β decoder with caching (past key/values)
- Tokenizer files β
vocab.json,source.spm,target.spm, etc. - Configs β model + tokenizer configs
π Usage
1. Install dependencies
pip install huggingface_hub onnxruntime transformers sentencepiece
2. Fetch and use a model programmatically
Example with Helsinki-NLP-opus-mt-tc-base-bat-zle (replace with any model name from the catalog):
from huggingface_hub import snapshot_download
import onnxruntime as ort
from transformers import MarianTokenizer
import numpy as np
# πΉ Step 1: Download the model folder (cached in ~/.cache/huggingface)
model_dir = snapshot_download(
repo_id="VaishalBusiness/opus",
allow_patterns="Helsinki-NLP-opus-mt-tc-base-bat-zle/*"
)
# πΉ Step 2: Load tokenizer
tokenizer = MarianTokenizer.from_pretrained(f"{model_dir}/Helsinki-NLP-opus-mt-tc-base-bat-zle")
# πΉ Step 3: Encode input
inputs = tokenizer("Hello, how are you?", return_tensors="np")
# πΉ Step 4: Run encoder
enc = ort.InferenceSession(f"{model_dir}/Helsinki-NLP-opus-mt-tc-base-bat-zle/encoder_model.onnx")
enc_out = enc.run(None, {
"input_ids": inputs["input_ids"],
"attention_mask": inputs["attention_mask"]
})
# πΉ Step 5: Run merged decoder
dec = ort.InferenceSession(f"{model_dir}/Helsinki-NLP-opus-mt-tc-base-bat-zle/decoder_model_merged.onnx")
decoder_input_ids = np.array([[tokenizer.pad_token_id]], dtype=np.int64)
out = dec.run(None, {
"input_ids": decoder_input_ids,
"encoder_hidden_states": enc_out[0]
})
print(out) # model outputs
β
This code works for any model in the hub. Just replace
Helsinki-NLP-opus-mt-tc-base-bat-zle with your desired model folder name.
π Model Catalog
The full catalog of ~the models is available at yet to add.
Each entry includes:
- π Model identifier (e.g.
Helsinki-NLP-opus-mt-tc-base-bat-zle) - π Direct download links to ONNX artifacts
- π Tokenizer + config files
- π Original Hugging Face model card
- π Model identifier (e.g.
We recommend filtering by language pairs or model family when browsing.
π Attribution
This project would not exist without the incredible open-source community.
- All models come from Helsinki-NLP, a cornerstone of multilingual machine translation.
- The Hugging Face ecosystem provides model hosting, tokenizers, and configs.
- The ONNX community enables fast inference across platforms.
π Huge thanks to all original authors and contributors.
π Licensing
- Each model retains the license of its original version.
- This hub provides ONNX conversions only; licenses are not overridden.
- Users are responsible for complying with the license terms of each model.
- When using a model, please cite the original authors and respect attribution requirements.
π€ Contributing
We welcome contributions!
- Found a model that needs fixing? Submit a PR.
- Want to add a new ONNX conversion? Weβd love to include it.
- Issues and improvements are always appreciated.
β‘ Final Notes
This hub is designed to make state-of-the-art NLP models available at scale, ready to drop into production or research pipelines. With 1,440+ ONNX models, you can cover a vast range of languages and tasks, all with the speed of ONNX Runtime.
π Explore β yet to add
π Deploy β Hugging Face Hub + ONNX Runtime