Downloads · 30 days
69
7% of all-time downloads
Yacinedh/translategemma-12b-khutbah
translategemma-12b-khutbah is a translation model from Yacinedh. Use it when you need text moved from one language to another. The card lists the license as gemma.
Arabic → German translation model specialized for Islamic sermons (khutbahs): religious rhetoric, classical rhymed prose (saj'), hadith quotations, and Islamic-German terminology (Allah, Gesandter, Gottesfurcht, Diess…
Downloads · 30 days
69
7% of all-time downloads
All-time downloads
1.1K
Public
Parameters
12.2B
31.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors24.4 GB · 77%
From the Hugging Face model README
Arabic → German translation model specialized for Islamic sermons (khutbahs): religious rhetoric, classical rhymed prose (saj'), hadith quotations, and Islamic-German terminology (Allah, Gesandter, Gottesfurcht, Diesseits/Jenseits, …).
Fine-tuned from google/translategemma-12b-it for MinbarAI, a live mosque-overlay translator that displays German subtitles for the congregation while the Imam speaks.
Evaluated on a 74-case khutbah benchmark (Quran recitation, liturgical formulas, hadith, and real sermon rhetoric from Grand-Mosque khutbahs), scored as cosine similarity of multilingual sentence embeddings against up to three reference translations (held out from training):
| Model | Overall | Free sermon rhetoric | chrF |
|---|---|---|---|
| google/translategemma-12b-it (stock) | 0.9535 | 0.8836 | 80.8 |
| this model | 0.9564 | 0.8959 | 83.8 |
Qualitative: the stock model's strict-template refusals on rhymed prose and hadith fragments are eliminated; Islamic terminology is rendered consistently.
model-Q4_K_M.gguf — quantized for llama.cpp / Ollama servingThe model expects TranslateGemma's structured chat template:
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Yacinedh/translategemma-12b-khutbah")
model = AutoModelForCausalLM.from_pretrained("Yacinedh/translategemma-12b-khutbah", device_map="auto")
messages = [{"role": "user", "content": [{
"type": "text", "source_lang_code": "ar", "target_lang_code": "de-DE",
"text": "أوصيكم ونفسي بتقوى الله عز وجل",
}]}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(inputs, max_new_tokens=128)[0][inputs.shape[1]:], skip_special_tokens=True))
Ollama (from the GGUF): create a Modelfile FROM ./model-Q4_K_M.gguf with the Gemma turn template and PARAMETER stop <end_of_turn> — see MinbarAI/server/modal_app.py for the exact Modelfile used in production.
Gemma Terms of Use (inherited from the base model). Quran translation data from Tanzil via fawazahmed0/quran-api.