Downloads · 30 days
27
5% of all-time downloads
luel/gemma-3-4b-tigrinya-qa
gemma-3-4b-tigrinya-qa is a text generation model from luel. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
Gemma-3-4B-Tigrinya-QA is a two-stage fine-tuned adaptation of Google's Gemma-3-4B specifically optimized for question-answering in Tigrinya (ትግርኛ).
Downloads · 30 days
27
5% of all-time downloads
All-time downloads
521
Public
Parameters
3.9B
7.8 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors7.8 GB · 99%
From the Hugging Face model README
Gemma-3-4B-Tigrinya-QA is a two-stage fine-tuned adaptation of Google's Gemma-3-4B specifically optimized for question-answering in Tigrinya (ትግርኛ).
This model demonstrates good capabilities in answering questions across various domains, including history, culture, and general knowledge, in Tigrinya.
Purpose: Tigrinya is a low-resource language with limited high-performance open models available. This release aims to reduce barriers to entry for research and application development in the Tigrinya language space.
Gemma3ForCausalLM<start_of_turn>user and <start_of_turn>model markersSFTTrainerFirst, install the Transformers library (version 4.50 or higher):
pip install -U transformers
Then, you can use it for inference as follows:
from transformers import Gemma3ForCausalLM, AutoTokenizer
import torch
model_id = "luel/gemma-3-4b-tigrinya-qa"
tok = AutoTokenizer.from_pretrained(model_id)
model = Gemma3ForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="cuda"
)
question = "ትግራይ ኣበይ ትርከብ?"
messages = [{"role": "user", "content": f"{question}"}]
prompt = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tok(prompt, return_tensors="pt").to(model.device)
# you can add and adjust max_length, temperature, repetition_penalty, top_p...
outputs = model.generate(**inputs, max_new_tokens=1024)
full_response = tok.decode(outputs[0], skip_special_tokens=False)
model_response = full_response.split("<start_of_turn>model\n")[-1].split("<end_of_turn>")[0].strip()
print(model_response)
<start_of_turn>user
{user_message}<end_of_turn>
<start_of_turn>model
{model_response}<end_of_turn>
Below is a short sample showcasing the model's response quality (generated with max_new_tokens=512, temperature=0.6, top_p=0.9).
Q (user): ሃገራት ቀርኒ ኣፍሪካ ዝኾኑ ኣየኖት እዮም?<br>
A (model): ኢትዮጵያ፣ ጅቡቲ፣ ኤርትራን ሶማልያን።
Q (user): ዓወት ኲናት ዓድዋ ንሃገራት ኣፍሪካ እንታይ መልእኽቲ እዩ ዘመሓላልፍ?<br>
A (model): ዓወት ኲናት ዓድዋ ኣብ ልዕሊ ባዕዳዊ መግዛእቲ ዝተፈፀመን ሃገራት ኣፍሪካ ነፃነተን ክቃለሳ ከምዝኽእላ ዘርኣየሉን ታሪክ ፍፃመ እዩ።
Q (user): ነዚ ምስላ እዚ ምልኣዮ። ምስ ቆልዓ ኣይትምከር<br>
A (model): ምስ ከልቢ ኣይትታሓባእ።
Q (user): ብዛዕባ ትግራይ ብሓፂሩ ንገረኒ<br>
A (model): ትግራይ ኣብ ሰሜን ኢትዮጵያ እትርከብ ክልል እያ። ርእሰ ከተማኣ መቐለ ኮይና ካልኦት ዓበይቲ ከተማታት ድማ ኣክሱም፡ ሽረ፡ ማይጨው እየን። ትግራይ ዝተፈላለዩ ህዝቢ፣ ታሪኽ ዘለዎምን ሃፍታም ባህሊ ዘለዎን ብዙሕነት ዝነብረላ እያ። ብዘደንቕ ተፈጥሮን ስነ-ጥበባዊ ምልክታትን ዝመልአት ቦታ እያ።
Q (user): ሰናይ ምምሕዳር እንታይ ማለት እዩ?<br>
A (model): ሰናይ ምምሕዳር ንዜጋታት ብዘይምጭፍልቕ፣ ብዘይኣድልዎን ብዘይ ኣፈላላይን ብማዕረ ግልጋሎት ዝህብ መንግስታዊ ኣሰራርሓ የመላኽት። ሰናይ ምምሕዳር ኩሉ ዜጋ ማዕረ መሰላት ከምዝወሃቦ ይገብር።
| Metric | Split | Value |
|---|---|---|
| Evaluation Loss | validation | 1.025 |
| Perplexity | validation | 2.79 |
| Token Accuracy | validation | 75% |
| Training Loss | final | 0.963 |
Validation corpus: 5% held-out split from 67.5k Q&A pairs
@misc{gemma-3-4b-tigrinya-qa,
author = {Luel},
title = {Gemma-3-4B-Tigrinya-QA: A Fine-tuned Question-Answering Model for Tigrinya},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/luel/gemma-3-4b-tigrinya-qa}}
}
This model builds upon Google's Gemma 3 4B foundation and the Tigrinya language adaptation. We acknowledge Google for making their foundation models available to the community, enabling the development of language-specific instruction-tuned models like this one.