β Live Demo on Hugging Face Spaces
Experience Gemma-3n-Swahili instantly in your browser - no downloads, no setup, just click and chat in Swahili!
π₯ Click here to watch the phone demo on YouTube
-
Download PocketPal AI app
-
Search for the model in the app:
Nadhari/gemma-3n-swahili-E2B-it-gguf -
Download and start chatting - It's that simple!
ollama run hf.co/Nadhari/gemma-3n-swahili-E2B-it-gguf:Q8_0For a better chat interface, use Ollamate - check their repository for detailed installation instructions.
Despite being spoken by over 200 million people across Sub-Saharan Africa, current AI models have limited Swahili comprehension and instruction following, leading to:
- Inability to maintain cultural understanding
- Limited support for code-switching common in modern Swahili usage
- Lack of specialized vocabulary for emerging technological concepts
Gemma-3n-Swahili represents a paradigm shift in how we approach low-resource language modeling. We've created models that excel specifically in Swahili while maintaining the ability to bridge to other languages when needed.
Explore our complete model collection on Hugging Face:
β Gemma-3n-Swahili Collection
- gemma-3n-swahili-E2B-it: Balanced performance for resource-constrained environments
- gemma-3n-swahili-E4B-it: Optimal for general Swahili applications
- GGUF Versions: Quantized models for mobile and edge deployment
Our models achieve significant improvements over base Gemma 3n on Swahili benchmarks:
These results demonstrate transformative gains in cross-lingual understanding.
We fine-tuned Gemma-3n models using:
- Dataset: 10,000 high-quality Swahili instruction-response pairs from Bactrian-X
- Method: LoRA fine-tuning with Unsloth framework
- Focus: Language-specific improvements while preserving multimodal capabilities
- β Excellent Swahili understanding and generation
- β Technical and creative writing capabilities
- β Cultural context awareness
- β Code-switching support
- β On-device deployment ready
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Nadhari/gemma-3n-swahili-E2B-it")
tokenizer = AutoTokenizer.from_pretrained("Nadhari/gemma-3n-swahili-E2B-it")
# Example usage
prompt = "Eleza kwa nini anga ni bluu?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)We welcome contributions!
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- The Bactrian-X team for the Swahili dataset
For questions, suggestions, or collaborations:
- Open an issue on GitHub
- Reach out on Hugging Face