Downloads · 30 days
423
6% of all-time downloads
UBC-NLP/serengeti
serengeti is a fill-mask model from UBC-NLP. Use it when you need the model to fill a missing word. It is set up for transformers.
<p align="center" <br <img src="./serengetilogo.png"/ <br <p
Downloads · 30 days
423
6% of all-time downloads
All-time downloads
7.7K
Public
Repo size
4.5 GB
Likes
6
Public
Click a slice to open those files.
.pt2.2 GB · 66%
From the Hugging Face model README
Below is an example for using Serengeti predict masked tokens.
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("UBC-NLP/serengeti", use_auth_token="XXX")
model = AutoModelForMaskedLM.from_pretrained("UBC-NLP/serengeti", use_auth_token="XXX")
from transformers import pipeline
classifier = pipeline("fill-mask", model=model, tokenizer=tokenizer)
classifier("ẹ jọwọ , ẹ <mask> mi") #Yoruba
[{'score': 0.07887924462556839,
'token': 8418,
'token_str': 'ọmọ',
'sequence': 'ẹ jọwọ, ẹ ọmọ mi'},
{'score': 0.04658124968409538,
'token': 156595,
'token_str': 'fẹ́ràn',
'sequence': 'ẹ jọwọ, ẹ fẹ́ràn mi'},
{'score': 0.029315846040844917,
'token': 204050,
'token_str': 'gbàgbé',
'sequence': 'ẹ jọwọ, ẹ gbàgbé mi'},
{'score': 0.02790883742272854,
'token': 10730,
'token_str': 'kọ',
'sequence': 'ẹ jọwọ, ẹ kọ mi'},
{'score': 0.022904086858034134,
'token': 115382,
'token_str': 'bẹ̀rù',
'sequence': 'ẹ jọwọ, ẹ bẹ̀rù mi'}]
For the more details please read this notebook
Serengeti aligns with Afrocentric NLP where the needs of African people is put into consideration when developing technology. We believe Serengeti will not only be useful to speakers of the languages supported, but also researchers of African languages such as anthropologists and linguists. We discuss below some use cases for Serengeti and offer a number of broad impacts.
Please refer to suported-languages
If you use the pre-trained model (Serengeti) for your scientific publication, or if you find the resources in this repository useful, please cite our paper as follows (to be updated):
@inproceedings{adebara-etal-2023-serengeti,
title = "{SERENGETI}: Massively Multilingual Language Models for {A}frica",
author = "Adebara, Ife and
Elmadany, AbdelRahim and
Abdul-Mageed, Muhammad and
Alcoba Inciarte, Alcides",
booktitle = "Findings of the Association for Computational Linguistics: ACL 2023",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.findings-acl.97",
doi = "10.18653/v1/2023.findings-acl.97",
pages = "1498--1537",
}
We gratefully acknowledges support from Canada Research Chairs (CRC), the Natural Sciences and Engineering Research Council of Canada (NSERC; RGPIN-2018-04267), the Social Sciences and Humanities Research Council of Canada (SSHRC; 435-2018-0576; 895-2020-1004; 895-2021-1008), Canadian Foundation for Innovation (CFI; 37771), Digital Research Alliance of Canada, UBC ARC-Sockeye, Advanced Micro Devices, Inc. (AMD), and Google. Any opinions, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of CRC, NSERC, SSHRC, CFI, the Alliance, AMD, Google, or UBC ARC-Sockeye.