--- license: mit pipeline_tag: translation library_name: transformers tags: - translation - multilingual - indic - mbart - model - pytorch - transformers --- # Transync [![Hugging Face Hub](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue)](https://huggingface.co/RohanMuralidharan/transync) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) [![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=flat&logo=pytorch&logoColor=white)](https://pytorch.org/) ## 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: ```bash pip install -r requirements.txt ``` ## CLI Example ```bash # 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