Xetu Assamese → English Translation Model (Fine-tuned OPUS-MT)
Model Name: xetu-assamese-to-english-translator
A high-quality Assamese → English neural machine translation model for the Xetu Chat App.
This repository contains a fine-tuned OPUS-MT multilingual model (opus-mt-mul-en) optimized for Assamese → English translation.
The model is trained for real-time bilingual messaging inside the Xetu Chat App , supporting auto-translate and seamless bilingual communication.
🔍 Overview
Base Model: Helsinki-NLP/opus-mt-mul-en (MarianMT)
Task: Machine Translation (Assamese → English)
Architecture: Seq2Seq Transformer (MarianMT)
Use Case:
Chat translation
Real-time multilingual messaging
Assamese NLP applications
Lightweight cloud inference
This fine-tuned version shows strong translation quality, especially for conversational and semi-formal Assamese text.
📊 Dataset & Training Details
Dataset Sizes
Split Size Train 50,000 pairs Validation 500 pairs Test 2,000 pairs
Data Format (JSON)
1 {
2 "source_text" : "Assamese sentence" ,
3 "target_text" : "English sentence"
4 }
Language Tags
This model does not require language prefix tokens (e.g., >>eng<<).
You can directly pass Assamese input.
⚙️ Preprocessing & Tokenization
Tokenizer from the base OPUS-MT model (AutoTokenizer)
max_source_length = 256
max_target_length = 256
Truncation enabled
Labels padded to -100 for loss masking
Example preprocessing:
tokenizer("অসমীয়া বাক্য")
🧠 Training Configuration
Hyperparameters
Parameter Value Epochs 5 Learning rate 3e-5 Warmup steps 800 Weight decay default Batch size/device 4 Gradient accumulation 4 Effective batch size 16 Precision fp16 = True Optimizer AdamW
Step Calculations
Steps/epoch: 50,000 / 16 = 3,125
Total steps: 15,625
Hardware: RTX 3050 (4 GB)
Training Runtime
Total time: ~1 hour 30 minutes
Steps/sec: 2.889
Samples/sec: 46.22
Final train loss: 1.4085
Training was stable with no gradient explosions.
📈 Validation Progress (Per Epoch)
Epoch Eval Loss BLEU chrF 1 1.5293 27.75 54.47 2 1.4229 29.78 56.69 3 1.3669 31.55 58.27 4 1.3440 32.29 59.13 5 1.3405 32.71 59.43
Consistent improvements every epoch — no overfitting observed.
🧪 Final Test Results
Metric Value Test BLEU 34.624 Test chrF 60.1136 Test Loss 1.3238
Test BLEU is higher than validation BLEU, indicating good generalization .
🚀 Usage
Python Example
1 from transformers import AutoTokenizer , AutoModelForSeq2SeqLM
2 import torch
3
4 model_name = "Ijaj7/xetu-assamese-to-english-translator"
5
6 tokenizer = AutoTokenizer . from_pretrained ( model_name )
7 model = AutoModelForSeq2SeqLM . from_pretrained ( model_name )
8
9 text = "মই আজ বিদ্যালয়লৈ গ’লোঁ।"
10 inputs = tokenizer ( text , return_tensors = "pt" )
11
12 with torch . no_grad ( ) :
13 outputs = model . generate ( ** inputs )
14
15 print ( tokenizer . decode ( outputs [ 0 ] , skip_special_tokens = True ) )
HuggingFace Inference API
1 curl -X POST \
2 -H "Authorization: Bearer YOUR_HF_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{"inputs": "মই কলেজলৈ গৈছো।"}' \
5 https://api-inference.huggingface.co/models/Ijaj7/xetu-assamese-to-English-translator
📱 Integration in Xetu Chat App
Optimized for:
Auto-translate incoming Assamese messages to English
Real-time translation in chats
Low-latency inference
Firebase Cloud Functions or HuggingFace serverless
This model pairs with your English → Assamese model for full bilingual support.
📝 Sample Outputs
Assamese English তোমাৰ লগত কথা পাতি ভাল লাগে It feels good to talk to you মই আজি ঘৰত থাকিম। I'll be at home today. মোৰ কেইটামান কাম আছে। I have a few things to do. তুমি অলপ অপেক্ষা কৰিব পাৰিবা নে? Could you wait a while?
📄 License
This model is released under the MIT License .
🙏 Acknowledgements
Helsinki-NLP OPUS-MT
Hugging Face Transformers
Assamese NLP community
Xetu App Project
📚 Citation
1 @misc{Ijaj7_Xetu_as_en_2025,
2 title = {Xetu: Assamese-to-English Translation Model},
3 author = {Ijaj Ahmed},
4 year = {2025},
5 howpublished = {\url{https://huggingface.co/Ijaj7/xetu-assamese-to-english-translator}},
6 note = {Accessed: 2025-11-28}
7 }