Downloads · 30 days
153
6% of all-time downloads
castorini/afriteva_small
afriteva_small is a machine learning model from castorini. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Hugging Face's logo --- language: - om - am - rw - rn - ha - ig - pcm - so - sw - ti - yo - multilingual tags: - T5
Downloads · 30 days
153
6% of all-time downloads
All-time downloads
2.5K
Public
Repo size
775 MB
Likes
0
Public
Click a slice to open those files.
.bin258 MB · 99%
From the Hugging Face model README
language:
AfriTeVa small is a sequence to sequence model pretrained on 10 African languages
Afaan Oromoo(orm), Amharic(amh), Gahuza(gah), Hausa(hau), Igbo(igb), Nigerian Pidgin(pcm), Somali(som), Swahili(swa), Tigrinya(tig), Yoruba(yor)
afriteva_small is pre-trained model and primarily aimed at being fine-tuned on multilingual sequence-to-sequence tasks.
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("castorini/afriteva_small")
>>> model = AutoModelForSeq2SeqLM.from_pretrained("castorini/afriteva_small")
>>> src_text = "Ó hùn ọ́ láti di ara wa bí?"
>>> tgt_text = "Would you like to be?"
>>> model_inputs = tokenizer(src_text, return_tensors="pt")
>>> with tokenizer.as_target_tokenizer():
labels = tokenizer(tgt_text, return_tensors="pt").input_ids
>>> model(**model_inputs, labels=labels) # forward pass
For information on training procedures, please refer to the AfriTeVa paper or repository
coming soon ...