Downloads · 30 days
41
8% of all-time downloads
Alfaxad/gemma2-2b-swahili-preview
gemma2-2b-swahili-preview is a text generation model from Alfaxad. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Gemma2-2B-Swahili-Preview is a Swahili variation of the base language model Gemma2 2B fine-tuned on the Inkuba-Mono Swahili dataset, designed to enhance Swahili language understanding through monolingual training.
Downloads · 30 days
41
8% of all-time downloads
All-time downloads
544
Public
Parameters
2.6B
5.3 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors5.2 GB · 99%
From the Hugging Face model README
Gemma2-2B-Swahili-Preview is a Swahili variation of the base language model Gemma2 2B fine-tuned on the Inkuba-Mono Swahili dataset, designed to enhance Swahili language understanding through monolingual training.
The model was fine-tuned on a focused subset of the Inkuba-Mono dataset:

This model is designed for:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("alfaxadeyembe/gemma2-2b-swahili-preview")
model = AutoModelForCausalLM.from_pretrained(
"alfaxadeyembe/gemma2-2b-swahili-preview",
device_map="auto",
torch_dtype=torch.bfloat16
)
# Set to evaluation mode
model.eval()
# Example usage
prompt = "Katika soko la Kariakoo, teknolojia mpya imewezesha"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=500,
do_sample=True,
temperature=0.7,
top_p=0.95
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
@misc{gemma2-2b-swahili-preview,
author = {Alfaxad Eyembe},
title = {Gemma2-2B-Swahili-Preview: Swahili Variation of Gemma2 2B},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face Model Hub},
}
For questions or feedback, please reach out through: