Views
No views yet
| 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 |
model-Q4_K_M.gguf — quantized for llama.cpp / Ollama serving1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("Yacinedh/translategemma-12b-khutbah")
4model = AutoModelForCausalLM.from_pretrained("Yacinedh/translategemma-12b-khutbah", device_map="auto")
5
6messages = [{"role": "user", "content": [{
7 "type": "text", "source_lang_code": "ar", "target_lang_code": "de-DE",
8 "text": "أوصيكم ونفسي بتقوى الله عز وجل",
9}]}]
10inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
11print(tok.decode(model.generate(inputs, max_new_tokens=128)[0][inputs.shape[1]:], skip_special_tokens=True))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.