Views
No views yet
1>>> from transformers import AutoTokenizer, AutoModelForTokenClassification
2>>> model = AutoModelForTokenClassification.from_pretrained("castorini/afriberta_small")
3>>> tokenizer = AutoTokenizer.from_pretrained("castorini/afriberta_small")
4# we have to manually set the model max length because it is an imported trained sentencepiece model, which huggingface does not properly support right now
5>>> tokenizer.model_max_length = 512 @inproceedings{ogueji-etal-2021-small,
title = "Small Data? No Problem! Exploring the Viability of Pretrained Multilingual Language Models for Low-resourced Languages",
author = "Ogueji, Kelechi and
Zhu, Yuxin and
Lin, Jimmy",
booktitle = "Proceedings of the 1st Workshop on Multilingual Representation Learning",
month = nov,
year = "2021",
address = "Punta Cana, Dominican Republic",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.mrl-1.11",
pages = "116--126",
}