Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

ยฉ 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Gemma-2-Swahili/Gemma-2-Swahili

Domain:

natural language processing

Record type:

model
Creator:
Gem
Host:
# Gemma 2 Swahili ๐ŸŒ Gemma 2 Swahili is a comprehensive suite of language models specifically adapted for Swahili language understanding and generation. This project brings advanced AI capabilities to over 200M Swahili speakers through efficient adaptation of Google's Gemma 2 models. ## Models ๐Ÿš€ | Model | Parameters | Type | Memory | Links | |-------|------------|------|---------|-------| | Gemma2-2B-Swahili-Preview | 2B | Base | ~4GB | HF \| Kaggle | | Gemma2-2B-Swahili-IT | 2B | Instruction-tuned | ~4GB | HF \| Kaggle | | Gemma2-9B-Swahili-IT | 9B | Instruction-tuned | ~18GB | HF \| Kaggle | | Gemma2-27B-Swahili-IT | 27B | Instruction-tuned | ~54GB | HF \| Kaggle | ## Features โœจ - Native Swahili language generation - Advanced instruction following in Swahili - Strong performance on academic and professional tasks - Cultural context awareness for East African content - Efficient deployment options across different scales ## Performance ๐Ÿ“Š ### Benchmark Results | Model | MMLU (SW) | Sentiment | Translation | |-------|-----------|-----------|-------------| | 2B-IT | 34.17% (+19.17) | 66.50% (+17.50) | 0.3735 BLEU-1 | | 9B-IT | 55.83% (+12.50) | 86.50% (+3.08) | 0.4709 BLEU-1 | | 27B-IT | 54.17% (+34.17) | 88.50% (+1.00) | 0.4994 BLEU-1 | ## Quick Start ๐Ÿš€ ### Installation ```bash pip install transformers accelerate ``` ### Basic Usage ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM # Load model and tokenizer model_path = "gemma2-swahili/gemma2-2b-swahili-it" tokenizer = AutoTokenizer.from_pretrained(model_path) model = AutoModelForCausalLM.from_pretrained( model_path, device_map="auto", torch_dtype=torch.bfloat16 ) # Generate text prompt = "Eleza umuhimu wa teknolojia ya kidijitali" inputs = tokenizer(prompt, return_tensors="pt") outputs = model.generate( **inputs, max_new_tokens=500, do_sample=True, temperature=0.7, top_p=0.95 ) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ### Using 4-bit Qua โ€ฆ

Visit

github.com

Tasks

language modeling

Languages

Swahili