A high-accuracy, context-aware neural transliteration model designed to convert native Devanagari Hindi text into natural conversational Hinglish (Romanized Hindi).
This model converts formal or spoken Hindi text (डॉक्टर ने मरीज को तुरंत अस्पताल ले जाने और टेस्ट कराने की सलाह दी) into everyday, natural Romanized text (Doctor ne marij ko turant aspatal le jane aur test karane ki salah di).
⚡ Primary Inference Engine: This model was explicitly trained and optimized for Akshar Engine — a dedicated, standalone C++17 runtime delivering sub-15ms real-time transliteration on any Windows PC with zero Python or CUDA dependencies.
| Format | File Location | File Size | Recommended For |
|---|---|---|---|
| GGUF (Q8_0) ⭐ | gguf/hindi-to-hinglish-pro.q8_0.gguf |
318 MB | ⚡ Akshar Engine (Primary/Recommended), llama.cpp, and native C++ apps |
| CTranslate2 (INT8) | ct2/ |
300 MB | High-throughput CUDA/CPU server backends |
| ONNX (INT8) | onnx/ |
460 MB | Cross-platform GPU (DirectML on AMD/Intel/NVIDIA) or CPU |
| PyTorch SafeTensors | model.safetensors |
1.19 GB | Python research, Hugging Face pipelines, and fine-tuning |
Transformer Sequence-to-Sequence (Google ByT5-Small)
├── Primary Runtime: Akshar Engine (Standalone C++17 / Vulkan GPU)
├── Encoder: 12 Transformer Layers (d_model=1472, heads=6)
├── Decoder: 4 Transformer Layers (d_model=1472, heads=6)
├── Tokenizer: Byte-Level UTF-8 (No Subword / Zero OOV)
├── Quantizations: Q8_0 (GGUF), INT8 (ONNX & CTranslate2), BF16 (SafeTensors)
└── Formats: GGUF, CTranslate2, ONNX, PyTorch
| Domain | 🇮🇳 Source Devanagari Hindi | ⚡ Generated Hinglish Output | Traditional Rule-Based (Flawed) |
|---|---|---|---|
| Tech & Software | सॉफ्टवेयर में नया अपडेट आ चुका है, कृपया सिस्टम रीस्टार्ट करें। | Software mein naya update aa chuka hai, kripya system restart karein. | sŏphṭavēyar mēṁ nayā apaḍēṭ... ❌ |
| Healthcare | डॉक्टर ने मरीज को तुरंत अस्पताल ले जाने की सलाह दी। | Doctor ne marij ko turant aspatal le jane ki salah di. | ḍŏkṭar nē marīza kō... ❌ |
| Finance | अगर आप शेयर मार्केट में इन्वेस्ट करना चाहते हैं, तो रिस्क मैनेजमेंट जरूरी है। | Agar aap share market mein invest karna chahte hain, toh risk management zaroori hai. | agar āp śēyar mārkēṭ... ❌ |
| Everyday Chat | अरे भाई, कल का मैच देखा क्या? क्या जबरदस्त कमबैक था! | Are bhai, kal ka match dekha kya? Kya zabardast comeback tha! | arē bhāī, kala kā maica... ❌ |
| Complex Conjuncts | विश्वविद्यालय के विद्यार्थियों ने वैज्ञानिक दृष्टिकोण पर चर्चा की। | Vishvavidyalay ke vidyarthiyon ne vaigyanik drishtikon par charcha ki. | viśvavidyālaya kē vidyārthiyōṁ... ❌ |
Tested on consumer hardware (Intel Core i7 / NVIDIA RTX GPU / AVX2):
| Runtime / Engine | Model File | Latency (Sentence) | Throughput | Memory Footprint |
|---|---|---|---|---|
| Akshar Engine (Vulkan GPU) ⭐ | GGUF Q8_0 | ~10ms – 15ms | ~948 chars/sec | ~870 MB VRAM |
| CTranslate2 (CUDA) | CT2 INT8 | ~25ms – 35ms | ~476 chars/sec | ~380 MB VRAM |
| ONNX Runtime (DirectML) | ONNX INT8 | ~30ms – 40ms | ~455 chars/sec | ~770 MB VRAM |
| PyTorch (Transformers) | SafeTensors | ~120ms | ~147 chars/sec | ~2.4 GB VRAM |
Akshar Engine is the dedicated native C++ inference engine designed specifically for this model. It provides sub-15ms real-time transliteration with zero Python setup and zero CUDA bloat.
hindi-to-hinglish-pro.q8_0.gguf weights on first run.stdin / stdout): Easily pipe sentences from Python, Node.js, Rust, Tauri, or Electron with no memory leaks or startup latency.# Direct single sentence
echo "नमस्ते भारत, आज का दिन बहुत अच्छा है" | akshar_engine.exe -m hindi-to-hinglish-pro.q8_0.gguf
# Output:
# namaste bharat, aaj ka din bahut achha hai
Run this model in Python without installing 5GB PyTorch or CUDA:
import subprocess
def transliterate_hindi(text: str, engine_path: str = "akshar_engine.exe", model_path: str = "hindi-to-hinglish-pro.q8_0.gguf") -> str:
process = subprocess.Popen(
[engine_path, "-m", model_path],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
text=True,
encoding="utf-8"
)
stdout, _ = process.communicate(input=text + "\n")
return stdout.strip()
print(transliterate_hindi("डिजिटल दुनिया में मशीन लर्निंग और एआई बहुत तेजी से बढ़ रहे हैं।"))
# Output: digital duniya mein machine learning aur AI bahut tezi se badh rahe hain.
use std::process::{Command, Stdio};
use std::io::Write;
pub fn transliterate(text: &str, model_path: &str) -> String {
let mut child = Command::new("akshar_engine.exe")
.args(["-m", model_path])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
.expect("Failed to start Akshar Engine");
if let Some(mut stdin) = child.stdin.take() {
writeln!(stdin, "{}", text).unwrap();
}
let output = child.wait_with_output().expect("Failed to read output");
String::from_utf8_lossy(&output.stdout).trim().to_string()
}
transformers)For Python researchers or Hugging Face pipelines:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
repo_id = "Singla0009/Hindi-to-Hinglish-Pro"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)
text = "आर्टिफिशियल इंटेलिजेंस हमारी ज़िंदगी को बहुत तेज़ी से बदल रहा है।"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: Artificial intelligence hamari zindagi ko bahut tezi se badal raha hai.
CTranslate2 (ct2/)For production CUDA batch servers:
pip install ctranslate2 huggingface_hub
import ctranslate2
from huggingface_hub import snapshot_download
model_path = snapshot_download("Singla0009/Hindi-to-Hinglish-Pro", allow_patterns=["ct2/*"])
translator = ctranslate2.Translator(f"{model_path}/ct2", device="cuda", compute_type="int8")
text = "कल हमारे कॉलेज में एक बड़ा प्रोग्राम आयोजित किया जाएगा"
tokens = list(text) # ByT5 byte tokens
results = translator.translate_batch([tokens], beam_size=1)
output = "".join(results[0].hypotheses[0])
print(output)
# Output: Kal hamare college mein ek bada program aayojit kiya jayega
onnx/)For cross-platform GPU (AMD, Intel, NVIDIA) with DirectML:
import onnxruntime as ort
from huggingface_hub import snapshot_download
model_path = snapshot_download("Singla0009/Hindi-to-Hinglish-Pro", allow_patterns=["onnx/*"])
onnx_dir = f"{model_path}/onnx"
providers = ['DmlExecutionProvider', 'CPUExecutionProvider']
encoder_session = ort.InferenceSession(f"{onnx_dir}/encoder_model_quantized.onnx", providers=providers)
decoder_session = ort.InferenceSession(f"{onnx_dir}/decoder_model_merged_quantized.onnx", providers=providers)
print("ONNX DirectML Engine loaded successfully!")
google/byt5-small