38 Downloads Updated 1 month ago
Name
7 models
swahili-gemma-1b:latest
2.0GB · 32K context window · Text · 1 month ago
swahili-gemma-1b:f32
4.0GB · 32K context window · Text · 1 month ago
swahili-gemma-1b:q2-k
690MB · 32K context window · Text · 1 month ago
swahili-gemma-1b:q3-k-m
722MB · 32K context window · Text · 1 month ago
swahili-gemma-1b:q4-k-s
781MB · 32K context window · Text · 1 month ago
swahili-gemma-1b:q5-k-m
851MB · 32K context window · Text · 1 month ago
swahili-gemma-1b:q8-0
1.1GB · 32K context window · Text · 1 month ago
A fine-tuned Gemma 3 1B instruction model specialized for English-to-Swahili translation and Swahili conversational AI. The model accepts input in both English and Swahili but outputs responses exclusively in Swahili.
# Run the recommended Q4_K_M quantization
ollama run crane-ai-labs/swahili-gemma-1b:q4-k-m
# Try different quantizations based on your needs
ollama run crane-ai-labs/swahili-gemma-1b:q8-0 # Higher quality
ollama run crane-ai-labs/swahili-gemma-1b:q4-k-s # Smaller size
ollama run crane-ai-labs/swahili-gemma-1b:f16 # Original quality
Model | Parameters | BLEU | chrF++ | Efficiency* |
---|---|---|---|---|
Gemma 3 4B | 4B | 10.9 | 44.1 | 2.7 |
Swahili Gemma 1B | 1B | 27.6 | 56.8 | 27.6 |
Gemma 3 27B | 27B | 29.4 | 60.0 | 1.1 |
GPT-5 Mini | ~8B | 31.8 | 62.4 | 4.0 |
Gemini 2.0 Flash | Large | 35.6 | 64.6 | N/A |
*Efficiency = BLEU Score / Parameters (in billions)
🏆 Efficiency Leader: Achieves the highest BLEU-to-parameter ratio (27.6 BLEU per billion parameters)
🚀 Size Advantage: Outperforms Gemma 3 4B (4x larger) by 153% on BLEU score
💎 Competitive Quality: Achieves 94% of Gemma 3 27B performance with 27x fewer parameters
⚡ Practical Deployment: Runs efficiently on consumer hardware while maintaining quality
Quantization | Size | Quality | Use Case |
---|---|---|---|
f16 |
~1.9GB | Highest | Maximum quality inference |
f32 |
~3.8GB | Highest | Research & benchmarking |
q8-0 |
~1.0GB | Very High | Production with ample resources |
q5-k-m |
~812MB | High | Balanced quality/size |
q4-k-m |
~769MB | Good | Recommended for most users |
q4-k-s |
~745MB | Good | Resource-constrained environments |
q3-k-m |
~689MB | Fair | Mobile/edge deployment |
q2-k |
~658MB | Lower | Minimal resource usage |
The model is optimized with the following parameters:
temperature: 0.3 # Focused, coherent responses
top_p: 0.95 # Nucleus sampling
top_k: 64 # Top-k sampling
max_tokens: 128 # Response length limit
repeat_penalty: 1.1 # Reduces repetition
ollama run crane-ai-labs/swahili-gemma-1b:q4-k-m
>>> Translate this to Swahili: "Hello, how are you today?"
ollama run crane-ai-labs/swahili-gemma-1b:q4-k-m
>>> Hujambo! Je, unaweza kunisaidia leo?
import ollama
response = ollama.chat(
model='crane-ai-labs/swahili-gemma-1b:q4-k-m',
messages=[
{
'role': 'system',
'content': 'You are a helpful Swahili conversation assistant.'
},
{
'role': 'user',
'content': 'Can you help me learn basic Swahili greetings?'
}
]
)
curl http://localhost:11434/api/chat -d '{
"model": "crane-ai-labs/swahili-gemma-1b:q4-k-m",
"messages": [
{
"role": "user",
"content": "Translate: Good morning, how did you sleep?"
}
]
}'
Swahili Gemma 1B delivers: - ✅ High-quality English-to-Swahili translation - ✅ Natural Swahili conversation - ✅ Effective text summarization - ✅ Fast inference on consumer hardware - ✅ Efficient memory usage
The model uses the official Gemma 3 chat template:
<start_of_turn>user
Your message here<end_of_turn>
<start_of_turn>model
Model response<end_of_turn>
Install Ollama (if not already installed):
curl -fsSL https://ollama.com/install.sh | sh
Pull the model:
ollama pull crane-ai-labs/swahili-gemma-1b:q4-k-m
Start chatting:
ollama run crane-ai-labs/swahili-gemma-1b:q4-k-m
import ollama
client = ollama.Client()
response = client.chat(
model='crane-ai-labs/swahili-gemma-1b:q4-k-m',
messages=[
{'role': 'user', 'content': 'Translate to Swahili: Hello!'}
]
)
print(response['message']['content'])
import { Ollama } from 'ollama'
const ollama = new Ollama({ host: 'http://127.0.0.1:11434' })
const response = await ollama.chat({
model: 'crane-ai-labs/swahili-gemma-1b:q4-k-m',
messages: [{ role: 'user', content: 'Translate to Swahili: Good morning!' }],
})
console.log(response.message.content)
This model is released under the Gemma Terms of Use. Please review the terms before use.
Found an issue or want to improve the model? We welcome: - Bug reports and feedback - Performance evaluations and benchmarks - Use case examples and integration guides - Documentation improvements
If you use these LiteRT models in your research or mobile applications, please cite:
@misc{crane_ai_labs_2025,
author = {Bakunga Bronson and Kato Steven Mubiru and Lwanga Caleb and Gimei Alex and Kavuma Lameck and Roland Ganafa and Sibomana Glorry and Atuhaire Collins and JohnRoy Nangeso and Tukamushaba Catherine},
title = {Swahili Gemma: A Fine-tuned Gemma 3 1B Model for Swahili conversational AI},
year = {2025},
url = {https://huggingface.co/CraneAILabs/swahili-gemma-1b},
organization = {Crane AI Labs}
}
Built with ❤️ by Crane AI Labs
Swahili Gemma - Your helpful Swahili AI companion