# Masked Language Model

- **Canonical URL:** https://getaimath.com/dictionary/masked-language-model/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is Masked Language Model?

**In one sentence:** A masked language model learns by filling in blanks: some words in a sentence are hidden and the model guesses them using words on both sides.

It is like a fill-in-the-blank worksheet: "The ___ barked at the mailman." Because the model can look both left and right, it gets very good at understanding meaning. But it is not as natural at writing long new text as causal models.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Masked Language Model?

BERT is a famous masked language model used for search and text classification.

## Why does Masked Language Model matter?

Masked models are great for understanding text, which is why they power many search and tagging tools.

## Related Concepts

- [Causal Language Model](https://getaimath.com/dictionary/causal-language-model/): A causal language model predicts the next word using only the words that came before it, never the ones after.
- [Next Token Prediction](https://getaimath.com/dictionary/next-token-prediction/): Next token prediction is the simple training game behind LLMs: look at some text and guess which token comes next.
- [Autoregressive Model](https://getaimath.com/dictionary/autoregressive-model/): An autoregressive model creates output one piece at a time, using everything it has created so far to choose the next piece.
- [Token](https://getaimath.com/dictionary/token/): A token is a small chunk of text, like a word or part of a word, that a language model reads and writes.
- [Encoder-Decoder Architecture](https://getaimath.com/dictionary/encoder-decoder-architecture/): An encoder-decoder architecture is a model design with two parts: one that reads and understands the input, and one that writes the output.
- [Tokenizer](https://getaimath.com/dictionary/tokenizer/): A tokenizer is the tool that chops text into tokens and turns each token into a number the model can use.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/masked-language-model/)
