Skip to content
All tags

#n-gram

3 posts

Harvard CS50 AI Week 6: Language — N-gram Language Models, TF-IDF QA, Parser & Attention

Week 6 processes natural language: N-gram conditional probability & smoothing, CFG syntax parsing with CYK, TF-IDF vector retrieval, attention mechanism & Transformer basics. Projects: Parser (syntactic generation) and Questions (TF-IDF QA system).

CMU 07-280 Lecture 17: From Tokenization to N-gram Language Models

Lecture 17 first decides how text becomes tokens, then uses N-grams to turn sequence probability into conditional probabilities estimated from corpus counts. Tokenization is the first design decision about what a model can see.

CMU 07-280 Lecture 18: How N-grams Train, Sample, and Fail

Lecture 18 truncates the chain rule with an N-gram Markov assumption, estimates probabilities from corpus counts, and contrasts greedy, categorical, and temperature sampling. The real bottlenecks are zero probability for unseen contexts and a fixed window.