emhaihsan/quran-indonesia-tafseer-translation
Viewer • Updated • 25.7k • 26 • 3
IQRA-AI/gemma-3-4b-Quran-1epochs is a fine-tuned version of the Gemma 3 4B model that has been specifically trained on Quranic content. This model has been fine-tuned for 1 epoch on a dataset consisting of Quranic knowledge, making it capable of providing information about the Quran, its chapters (surahs), verses (ayat), and related Islamic topics.
This model is designed to:
pip install transformers accelerate torch
from transformers import AutoProcessor, Gemma3ForConditionalGeneration
import torch
model_id = "IQRA-AI/gemma-3-4b-Quran-1epochs"
model = Gemma3ForConditionalGeneration.from_pretrained(
model_id, device_map="auto"
).eval()
processor = AutoProcessor.from_pretrained(model_id)
messages = [
{
"role": "system",
"content": [{"type": "text", "text": ""}]
},
{
"role": "user",
"content": [
{"type": "text", "text": "Surah Al Fatihah turun dimana?"}
]
}
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)
input_len = inputs["input_ids"].shape[-1]
with torch.inference_mode():
generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
generation = generation[0][input_len:]
decoded = processor.decode(generation, skip_special_tokens=True)
print(decoded)
This model is subject to the Gemma 3 license. Please ensure you follow all licensing requirements when using this model.
If you use this model in your research or applications, please cite:
@misc{iqra-ai-gemma-3-4b-quran,
author = {IQRA-AI},
title = {Gemma 3 4B Quran 1 Epoch},
year = {2025},
publisher = {Hugging Face},
author = {Ariel Fikru Avicenna}
howpublished = {\url{https://huggingface.co/IQRA-AI/gemma-3-4b-Quran-1epochs}}
}
For questions, suggestions, or issues related to this model, please contact us through the Hugging Face model repository.