AI Rookies

N-gram LM — n-gram Language Model

Fact

A stats-based language model that guesses the next token from the previous n−1 tokens.

In Plain Words

An n-gram LM is like your phone keyboard. It peeks at a few words, then proudly suggests “sounds good.”

It helped keyboards and speech tools guess text. Long stories can confuse it.

Related Concepts

LM
An n-gram LM was a classic early stats-based way to do LM.

Autoregressive Model
It predicts the next token from left to right.

Token
Tokens are the basic pieces it counts and predicts.

Perplexity
Perplexity is often used to test how well it guesses the next token.