Transync

Hugging Face Hub License: MIT Python 3.8+ PyTorch

Model Overview

Transync is a multilingual translation model based on the MBart architecture, designed for offline neural machine translation. This repository provides inference capabilities for translating between 50+ languages including all major Indian languages (Hindi, Telugu, Tamil, Bengali, Gujarati, Marathi, Punjabi, Urdu, and more).

Features

  • βœ… Multilingual Support: 50+ languages including all major Indian languages
  • βœ… High-Quality Translations: Based on the MBart architecture
  • βœ… Offline Operation: Works without internet connection
  • βœ… Efficient Inference: Optimized for both CPU and GPU
  • βœ… Batch Processing: Supports batch translation for efficiency
  • βœ… CLI Interface: Command-line interface for easy usage

Supported Languages

The model supports 50+ languages including:

Supported Languages

Short Code Language Script MBart Code
eng English Latin en_XX
hin Hindi Devanagari hi_IN
tel Telugu Telugu te_IN
tam Tamil Tamil ta_IN
mal Malayalam Malayalam ml_IN
kan Kannada Kannada kn_IN
ben Bengali Bengali bn_IN
guj Gujarati Gujarati gu_IN
mar Marathi Devanagari mr_IN
pan Punjabi Gurmukhi pa_IN
urd Urdu Arabic ur_PK
asm Assamese Bengali as_IN
npi Nepali Devanagari ne_NP
ory Odia Odia or_IN
san Sanskrit Devanagari sa_IN
mai Maithili Devanagari mai_IN
brx Bodo Devanagari brx_IN
doi Dogri Devanagari doi_IN
gom Konkani Devanagari gom_IN
mni Meitei Bengali mni_IN
sat Santali Ol Chiki sat_IN
kas Kashmiri Arabic ks_IN
snd Sindhi Arabic sd_IN

Installation

Install the required dependencies:

pip install -r requirements.txt

CLI Example

# Translate single text
python transync_inference.py eng hin "Hello, how are you?"

# Batch translation from file
python transync_inference.py --batch eng hin -f input.txt -o output.txt

Repository Structure

transync/
β”œβ”€β”€ config.json                 # Model configuration
β”œβ”€β”€ generation_config.json      # Generation configuration
β”œβ”€β”€ pytorch_model.bin           # Model weights
β”œβ”€β”€ sentencepiece.bpe.model     # SentencePiece tokenizer model
β”œβ”€β”€ tokenizer_config.json       # Tokenizer configuration
β”œβ”€β”€ special_tokens_map.json     # Special tokens mapping
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ LICENSE                     # MIT License
β”œβ”€β”€ requirements.txt            # Dependencies
└── transync_inference.py       # Inference code

Model Architecture

This model is built on the MBart (Multilingual BART) architecture, which is a sequence-to-sequence model pre-trained on multilingual data. It leverages the power of BART's bidirectional encoder and autoregressive decoder for translation tasks.

Tokenizer

The model uses SentencePiece tokenizer for subword tokenization. The tokenizer is compatible with the MBart50 tokenizer format and supports 50+ languages.

Limitations

  • Translation quality varies across language pairs.
  • The model should be evaluated before production use.
  • Performance depends on hardware and input length.

License

MIT

Downloads last month
50
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support