Downloads · 30 days
17
3% of all-time downloads
Univars/k-gpt-v1
k-gpt-v1 is a text generation model from Univars. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
K-GPT is version one of Kenya's — and eventually Africa's — Sovereign AI project, being undertaken by a team from Univars.space under Rewel AI Labs.
Downloads · 30 days
17
3% of all-time downloads
All-time downloads
594
Public
Repo size
5.8 GB
Likes
1
Public
Click a slice to open those files.
.pt3.9 GB · 60%
From the Hugging Face model README
K-GPT is version one of Kenya's — and eventually Africa's — Sovereign AI project, being undertaken by a team from Univars.space under Rewel AI Labs.
K-GPT is designed to deeply understand and serve Kenyan citizens in their own languages, cultural contexts, legal frameworks, and economic realities. It is the first step toward building a truly African-grounded large language model.
K-GPT v1 is a QLoRA-finetuned adaptation of Qwen 2.5 7B, trained on 27 curated Kenyan datasets totaling approximately 18.9 million tokens. The model specializes in Kenyan multilingual understanding, constitutional law, cultural nuance, and domain-specific knowledge across banking, tourism, agriculture, and governance.
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-7B |
| Fine-tuning Method | QLoRA SFT (4-bit NF4 quantization) |
| LoRA Configuration | r=64, alpha=128, dropout=0.05 |
| Training Duration | 3 epochs, 1,041 steps (~2h 11m on RTX 4090) |
| Final Training Loss | 0.000161 |
| Total Training Tokens | ~18.9 million |
| Datasets | 27 curated Kenyan datasets |
K-GPT v1 supports the following languages and dialects:
K-GPT v1 was trained on 27 carefully curated datasets covering:
| Category | Examples | Tokens (approx.) |
|---|---|---|
| Multilingual Corpora | Swahili-English parallel text, Sheng dictionaries, Kamba/Luo/Kikuyu text | ~6M |
| Government & Legal | Kenya 2010 Constitution, Parliament Hansard transcripts, DPA 2019 | ~4M |
| Financial & Banking | CBK regulations, M-Pesa transaction patterns, KYC compliance docs | ~2.5M |
| Tourism & Culture | Mt. Kenya tourism guides, cultural heritage documents, folklore | ~2M |
| Agriculture | Crop data, market prices, extension service guides | ~1.5M |
| News & Media | Kenyan news articles, social media, community forums | ~2.9M |
| Total | 27 datasets | ~18.9M tokens |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B")
tokenizer = AutoTokenizer.from_pretrained("Univars/k-gpt-v1")
# Load K-GPT adapter
model = PeftModel.from_pretrained(base_model, "Univars/k-gpt-v1")
# Generate
inputs = tokenizer("Habari! Niambie kuhusu Katiba ya Kenya ya 2010.", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
K-GPT is built by the Univars team at Rewel AI Labs.
K-GPT v1 is the foundation for a pan-African Sovereign AI initiative. Future versions will expand to cover all 54 African nations, additional languages, and domain-specific capabilities.