Natural Language Processing (NLP) & LLMs
Tokenization/BPE, N-Gram smoothing & perplexity, TF-IDF/BM25, Word2Vec embeddings, HMM Viterbi, Self-Attention & Transformers.
Published Study Notes & Chapters (3)
N-Gram Language Models, Laplace/Kneser-Ney Smoothing & Perplexity
Markov chain N-gram MLE probabilities, Add-1 (Laplace) & Add-k smoothing formulas, Interpolation vs Backoff, Kneser-Ney continuation probability, and Cross-Entropy / Perplexity numericals.
Lexical & Vector Semantics: TF-IDF, BM25, Word2Vec (Skip-Gram / CBOW) & GloVe
Sparse Bag-of-Words vs TF-IDF & Okapi BM25 saturation, Cosine Similarity invariance, Word2Vec CBOW vs Skip-Gram with Negative Sampling (SGNS), and vector analogy arithmetic.
Sequence Labeling (HMM Viterbi) & Transformers (Self-Attention, BERT vs GPT)
HMM generative tagging & O(T * S^2) Viterbi DP decoding, Scaled Dot-Product & Multi-Head Self-Attention parameter counts, Causal Masking, Positional Encodings, and BERT vs GPT vs T5.
Solved Natural Language Processing (NLP) & LLMs PYQs & Practice Questions
Launch Timed Mock (9 Qs)A language model achieves a per-token Cross-Entropy of (base- log) on a held-out evaluation corpus. What is the Perplexity () of the language model?
A corpus has vocabulary size . The unigram data occurs times, and the bigram data science occurs times. Under Laplace (Add-1) Smoothing, what is ?
Which embedding architecture represents each word as a bag of character -grams, enabling it to generate meaningful vectors for unseen Out-of-Vocabulary (OOV) words at inference time?
In a collection of documents, the word "the" appears at least once in every single document (). Using standard without smoothing, what is the TF-IDF weight of "the" in document ?
Which of the following statements about Transformer Self-Attention and Modern LLMs are TRUE?
A Multi-Head Self-Attention layer has model dimension and attention heads with . What is the per-head key dimension ?
How does GPT (Decoder-Only) prevent token position from attending to future tokens during parallelized training?
An HMM Part-of-Speech tagger has distinct POS tags and processes a sentence of tokens. What is the asymptotic order of operations required by the Viterbi algorithm vs naive exhaustive tag enumeration?