File size: 4,255 Bytes
0f5e181 e4028dd 0f5e181 e9bf905 0f5e181 |
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
---
license: apache-2.0
language:
- ta
---
# **Debug Divas: Colloquial Tamil Translation Model**
🚀 **Fine-tuned Mistral-7B for English-to-Colloquial Tamil Translation**

[](https://opensource.org/licenses/MIT)
## 🌟 **Overview**
This model is a **fine-tuned version of Mistral-7B** using **Unsloth's FastLanguageModel**, designed specifically to translate **English text into colloquial Tamil** (spoken Tamil). It is optimized for **real-world Tamil conversations**, making it useful for chatbots, assistants, and translation tools.
---
## 📖 **Model Details**
- **Base Model**: [Mistral-7B-Instruct](https://huggingface.co/mistral-7b-instruct)
- **Fine-Tuned Dataset**: Custom dataset (`debug_divas_dataset.json`) with **English → Colloquial Tamil** translation pairs.
- **Training Library**: [Unsloth](https://github.com/unslothai/unsloth) (optimized training for large models)
- **Max Sequence Length**: 128 tokens
- **Batch Size**: 8
- **Epochs**: 3
- **Optimizer**: AdamW
---
## 🔧 **Installation & Setup**
To use this model, install the necessary dependencies:
```bash
pip install torch transformers datasets unsloth accelerate
```
---
## 🚀 **Usage**
### **Load Model & Tokenizer**
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load fine-tuned model from Hugging Face
model_name = "your-huggingface-username/debug-divas-tamil-translation"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Translation function
def translate_english_to_tamil(input_text):
instruction = "Translate the following English sentence to colloquial Tamil"
inputs = tokenizer(f"{instruction}: {input_text}", return_tensors="pt").to(device)
translated_tokens = model.generate(**inputs, max_length=128)
translated_text = tokenizer.decode(translated_tokens[0], skip_special_tokens=True)
return translated_text
# Example usage
input_text = "The pharmacy is near the bus stop."
translated_text = translate_english_to_tamil(input_text)
print("Colloquial Tamil:", translated_text)
```
---
## 📝 **Example Outputs**
| **English** | **Colloquial Tamil Translation** |
|------------|---------------------------------|
| "How are you?" | "நீங்க எப்படி இருக்கீங்க?" |
| "I am going to the market." | "நான் மார்க்கெட்டுக்கு பொறேன்." |
| "The pharmacy is near the bus stop." | "மருந்துக் கடை பஸ்ஸ்டாப் அருகே இருக்க." |
---
## 📚 **Dataset**
The dataset contains **pairs of English sentences** with their **colloquial Tamil translations**.
Example format:
```json
[
{
"input": "How are you?",
"output": "நீங்க எப்படி இருக்கீங்க?"
},
{
"input": "I am going to the market.",
"output": "நான் மார்க்கெட்டுக்கு பொறேன்."
}
]
```
---
## 🏗 **Training Details**
The model was fine-tuned using **UnslothTrainer** with the following hyperparameters:
- **Batch Size**: 8
- **Epochs**: 3
- **Learning Rate**: 2e-5
- **FP16 Training**: Disabled
- **Optimizer**: AdamW
- **Dataset Split**: 80% Train, 20% Test
---
## ⚖ **License & Citation**
This model is released under the **MIT License**. If you use it in your work, please cite:
```bibtex
@misc{debugdivas2025,
author = {Debug Divas},
title = {Fine-tuned Mistral-7B for Colloquial Tamil Translation},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/your-huggingface-username/debug-divas-tamil-translation}
}
```
---
Dataset Linke : https://huggingface.co/datasets/anitha2520/debug_divas45/tree/main
anitha2520/debug_divas45
## ❤️ **Contributions & Feedback**
We welcome feedback and contributions! Feel free to open an issue or contribute to our dataset.
📧 **Contact:** [xidanitha@gmail.com]
---
|