🌍 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

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


Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support