AI Fill-Mask: Predict the Missing Word (DistilBERT)

Put [MASK] where a word is missing and see which words a real neural language model finds most likely, with probabilities.

Use the tool

Why this tool exists

Fill-mask is how BERT-style models are trained: hide a word and predict it from the words on both sides. Seeing the ranked guesses shows what the model has learned about grammar, facts and common phrases, and is handy for word choice, cloze tests and teaching how language models work.

This page runs distilbert-base-uncased (Apache-2.0, 66 million parameters, int8 weights) with a hand-written JavaScript engine. The first run downloads 69 MB from this site; after that it works offline and your text is never uploaded. It is English only, lowercase output, and its probabilities describe common usage in its training text, not truth.

How to use it

  1. Type an English sentence and write [MASK] where the word goes (up to five masks).
  2. Press Predict; the first run downloads the model once.
  3. Read the ranked words and their probabilities, or click "Use" to put one into the sentence.

Frequently asked questions

Is my text sent anywhere?

No. The model file is fetched once from this site and runs in your tab. Your sentence never leaves the browser.

Why do some words start with ##?

WordPiece splits rare words into pieces. A piece starting with ## continues the word before it.

How accurate is it?

It matches the original PyTorch model on our test sentences (top word identical); int8 compression changes probabilities by about a percent. Like any language model it reflects its training data and can be biased or wrong.