All drills

Language Modeling from First Principles

What you'll be able to do

Build the autocomplete that finishes your sentences — the next-word predictor behind Gboard, Apple QuickType, and SwiftKey — from word counts up, with no neural network.

The original language model — n-gram predictors power phone-keyboard suggestions, search-query completion, and spelling correction, and they are the statistical foundation every neural LLM is built on.
Start this internship
Create an account to unlock the 8 sections, the workbench, and AskThili.
Begin

Sections

1. Language Modeling from First Principles — a Predictive-Text Engine
🔒 locked
2. Lesson 1 - What a language model is
🔒 locked
3. Lesson 2 - Count the n-grams
🔒 locked
4. Lesson 3 - Counts to probabilities (MLE)
🔒 locked
5. Lesson 4 - Make it write
🔒 locked
6. Lesson 5 - The zero-probability problem
🔒 locked
7. Lesson 6 - How good is it? Cross-entropy & perplexity
🔒 locked
8. Lesson 7 - Ship your predictive-text engine
🔒 locked

Dig deeper

📄Prediction and Entropy of Printed English (Shannon, 1951) — the origin of language modeling
paper
🔗Speech and Language Processing (Jurafsky & Martin), Ch. 3 — N-gram Language Models
article

Part of these learning paths

I'm a developer and I want to fine-tune small LLMs for my own use case
View path →