Views
No views yet
pip install transformers1from transformers import AutoTokenizer, AutoModelForMaskedLM
2
3tokenizer = AutoTokenizer.from_pretrained("robzchhangte/mizbert")
4model = AutoModelForMaskedLM.from_pretrained("robzchhangte/mizbert")1from transformers import pipeline
2
3fill_mask = pipeline("fill-mask", model="robzchhangte/mizbert")
4
5sentence = "Miten kan thiltih [MASK] min teh thin" ##Expected token "atangin". In English: A tree is known by its fruit.
6predictions = fill_mask(sentence)
7
8for prediction in predictions:
9 print(prediction["sequence"].replace("[CLS]", "").replace("[SEP]", "").strip(), "| Score:", prediction["score"])
10@article{lalramhluna2024mizbert,
title={MizBERT: A Mizo BERT Model},
author={Lalramhluna, Robert and Dash, Sandeep and Pakray, Dr Partha},
journal={ACM Transactions on Asian and Low-Resource Language Information Processing},
year={2024},
publisher={ACM New York, NY}
}