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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 4,089 Bytes
3fa8f3e 00c68bb 3fa8f3e 00c68bb 3fa8f3e 00c68bb 3fa8f3e 00c68bb 3fa8f3e 00c68bb 3fa8f3e 00c68bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | ---
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 |