Downloads · 30 days
19
3% of all-time downloads
nairaxo/toumbert
toumbert 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.
You can use this model directly with a pipeline for masked language modeling:
Downloads · 30 days
19
3% of all-time downloads
All-time downloads
601
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
You can use this model directly with a pipeline for masked language modeling:
>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='nairaxo/toumbert')
>>> 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/toumbert')
model = BertModel.from_pretrained("nairaxo/toumbert")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
and in TensorFlow:
from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('nairaxo/toumbert')
model = TFBertModel.from_pretrained("nairaxo/toumbert")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)