Amharic Language Models
Collection
Open language models adapted and trained for Amharic. • 3 items • Updated
How to use b1n1yam/gemma-2-27b-amharic-cpt with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("b1n1yam/gemma-2-27b-amharic-cpt", device_map="auto")This model is a continual pretrained version of unsloth/gemma-2-27b-bnb-4bit on Amharic text data. The tokenizer was expanded from the original 256k vocabulary to better support Amharic script, and the model underwent continual pretraining with ~2B tokens of Amharic corpus data.
Note: This is an early research version open-sourced solely for research purposes on low-resource language LLMs. For production-ready models with multimodality features, please visit platform.addisassistant.com.
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "b1n1yam/gemma-2-27b-amharic-cpt"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
prompt = "አዲስ አበባ የኢትዮጵያ"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model underwent continual pretraining (CPT) on Amharic text data:
If you use this model, please cite:
@misc{daniel2024addisai,
title = {Addis AI: Continual Pretrained Gemma 2 27B for Amharic},
author = {Daniel, Biniyam},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/b1n1yam/gemma-2-27b-amharic-cpt}}
}