Downloads · 30 days
24
3% of all-time downloads
nairaxo/bantulm
bantulm is a fill-mask model from nairaxo. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
BantuLM is a multilingual BERT-based model specifically designed for Bantu languages, including Chichewa, Kinyarwanda, Swahili, Zulu, and others. The model is trained for masked language modeling (Fill-Mask), which pr…
Downloads · 30 days
24
3% of all-time downloads
All-time downloads
752
Public
Repo size
2.4 GB
Likes
0
Public
Click a slice to open those files.
.bin808 MB · 99%
From the Hugging Face model README
BantuLM is a multilingual BERT-based model specifically designed for Bantu languages, including Chichewa, Kinyarwanda, Swahili, Zulu, and others. The model is trained for masked language modeling (Fill-Mask), which predicts masked tokens in sentences, and is tailored to capture linguistic nuances in Bantu languages.
This model is primarily useful for:
You can use this model directly with a pipeline for masked language modeling:
>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='nairaxo/bantulm')
>>> unmasker("rais wa [MASK] ya tanzania")
Here is how to use this model to get the features of a given text in PyTorch:
from transformers import BertTokenizer, BertModel
tokenizer = BertTokenizer.from_pretrained('nairaxo/bantulm')
model = BertModel.from_pretrained("nairaxo/bantulm")
text = "rais wa jamhuri ya tanzania"
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
and in TensorFlow:
from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('nairaxo/bantulm')
model = TFBertModel.from_pretrained("nairaxo/bantulm")
text = "rais wa jamhuri ya tanzania"
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
The model is pre-trained on a collection of text data from several Bantu languages, aiming to represent the diversity of linguistic structures within the Bantu language family.
The model may reflect certain biases based on the specific texts used in training and may not perform well for languages outside the Bantu family. Performance on under-represented dialects could also vary.
Performance metrics and evaluation data for this model are currently limited due to the specialized nature of Bantu languages and the available benchmarks.
If you use this model, please cite it as follows:
@article{Mohamed2023,
title = {BantuLM: Enhancing Cross-Lingual Learning in the Bantu Language Family},
url = {http://dx.doi.org/10.21203/rs.3.rs-3793749/v1},
DOI = {10.21203/rs.3.rs-3793749/v1},
publisher = {Research Square Platform LLC},
author = {Mohamed, Naira Abdou and Benelallam, Imade and Bahafid, Abdessalam and Erraji, Zakarya},
year = {2023},
month = dec
}