0

When viewing the top predicted tokens in masked language modelling (MLM), is it possible to use top_k with k=len(vocab)?

So far, I have used this following line of code:

mask_filler("The capital of [MASK] is Paris", top_k=5)

Would it be possible to incorporate k=len(vocab) into the line of code above to see the predicted tokens in my vocabulary or not?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
  • Where does the `mask_filler` come from? It does not sound like something one could find in the Hugginngface Transformers API. – Jindřich Aug 10 '21 at 07:25
  • Hello, I found it here: https://discuss.huggingface.co/t/how-to-test-masked-language-model-after-training-it/7029 –  Aug 10 '21 at 09:06

0 Answers0