Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

nadhari/Gemma-3n-Swahili

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gemma-3n-Swahili: On-Device Swahili AI Assistant

ChatGPT Image Aug 9, 2025, 03_56_16 AM

Hugging Face Demo License

πŸš€ Try It Now - No Installation Required!

β†’ Live Demo on Hugging Face Spaces

Experience Gemma-3n-Swahili instantly in your browser - no downloads, no setup, just click and chat in Swahili!

πŸ“± Run on Your Phone

πŸ“Ή Watch Demo Video

Phone Demo Video

πŸŽ₯ Click here to watch the phone demo on YouTube

iOS & Android Instructions:

  1. Download PocketPal AI app

  2. Search for the model in the app:

    Nadhari/gemma-3n-swahili-E2B-it-gguf
    
  3. Download and start chatting - It's that simple!

πŸ’» Run on Desktop

Quick Start with Ollama

ollama run hf.co/Nadhari/gemma-3n-swahili-E2B-it-gguf:Q8_0

Enhanced Experience with Ollamate

For a better chat interface, use Ollamate - check their repository for detailed installation instructions.


🌍 About Gemma-3n-Swahili

The Challenge

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

Introducing Gemma-3n-Swahili

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.

πŸ€— Model Collection

Explore our complete model collection on Hugging Face:

β†’ Gemma-3n-Swahili Collection

Available Models

πŸ“Š Performance Benchmarks

Our models achieve significant improvements over base Gemma 3n on Swahili benchmarks:

Swahili MMLU Results

overall_performance

Translation Performance

translation_performance_comparison translation_perplexity_comparison

These results demonstrate transformative gains in cross-lingual understanding.

πŸ› οΈ Technical Details

Training Approach

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
Screenshot 2025-08-09 at 3 05 13 Screenshot 2025-08-09 at 3 05 35

Key Features

  • βœ… Excellent Swahili understanding and generation
  • βœ… Technical and creative writing capabilities
  • βœ… Cultural context awareness
  • βœ… Code-switching support
  • βœ… On-device deployment ready

πŸš€ Quick Start for Developers

Using Transformers

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)

🀝 Contributing

We welcome contributions!

πŸ“„ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Acknowledgments

  • The Bactrian-X team for the Swahili dataset

πŸ“¬ Contact

For questions, suggestions, or collaborations:


Made with ❀️

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published