Instructions to use RohanMuralidharan/Transync with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RohanMuralidharan/Transync with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="RohanMuralidharan/Transync")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("RohanMuralidharan/Transync") model = AutoModelForSeq2SeqLM.from_pretrained("RohanMuralidharan/Transync") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| pipeline_tag: translation | |
| library_name: transformers | |
| tags: | |
| - translation | |
| - multilingual | |
| - indic | |
| - mbart | |
| - model | |
| - pytorch | |
| - transformers | |
| # Transync | |
| [](https://huggingface.co/RohanMuralidharan/transync) | |
| [](https://opensource.org/licenses/MIT) | |
| [](https://www.python.org/downloads/) | |
| [](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 |