the.ai

Foundations / Statistics

verified

N-Gram Model

Predict the next word by counting how often it followed the previous few in a large pile of text. No parameters to learn beyond the counts, no training in any modern sense. It was the language model for forty years, it is the baseline every neural model was argued against, and Perplexity exists because of it.

Viz primitive · budget-splitunseen-ngrams = 20

unseen-ngrams holds 50% of the budget; rest holds the remaining 50%.

N-grams the corpus never contained, against the ones it did, in equal units. Drag the unseen count up to watch the table become mostly holes — it grows as the vocabulary to the power of the context length, which is the wall dense representations were invented to get past.

20

Reviewed by opendroid · 2026-08-18

  • arXiv:1206.6426 — A fast and simple algorithm for training neural probabilistic language models
  • arXiv:1301.3781 — Efficient Estimation of Word Representations in Vector Space