Natural Language Processing
Notes on natural language processing, from classical system-building approaches to modern neural and reinforcement-learning methods for language models.
CMU Advanced NLP Lecture 15: Reinforcement Learning Fundamentals MDPs, REINFORCE score-function cancellation, discounting, state baselines, CartPole runs, and PPO clipping.
CMU Advanced NLP Lecture 14: Research Skills and Experimental Design Falsifiable hypotheses, statistical power analysis, resampling variance floors, and Cohen’s kappa.
CMU Advanced NLP Lecture 13: Evaluation and Benchmarks Loss vs. task metrics, six benchmark properties, clustered SEs, and paired confidence intervals.
CMU Advanced NLP Lecture 12: Multimodal Modeling II Pixel autoregression bottlenecks, VQ-VAE codebooks, VQ-GAN early fusion, and CLIP-conditioned diffusion.
CMU Advanced NLP Lecture 11: Multimodal Modeling I ViT patch tokens, CLIP contrastive alignment, LLaVA projection, and Molmo multi-crop grounding.
CMU Advanced NLP Lecture 10: Retrieval and RAG Datastore choices, ranking objectives, and supported generation.
CMU Advanced NLP Lecture 8: Fine-Tuning and Distillation Trainable parameters, loss masks, and teacher distributions define adaptation.
CMU Advanced NLP Lecture 7: In-Context Learning Prompts, demonstrations, reasoning traces, and the boundary between generation and verified answers.
CMU Advanced NLP Lecture 6: Pretraining Prediction objectives, data selection, and the parameter–token tradeoff under a fixed compute budget.
CMU Advanced NLP Lecture 5: Attention and Transformers Causal attention, positions, residual paths, normalization, and KV-cache accounting.
CMU Advanced NLP Lecture 4: Recurrent Neural Networks Recurrent states, gradient products, gates, encoder–decoder attention, and the source-padding boundary.
CMU Advanced NLP Lecture 3: Language Modeling Fundamentals Count-based estimates, smoothing, neural parameter sharing, cross-entropy, perplexity, and evaluation boundaries.
CMU Advanced NLP Lecture 21: Mixture of Experts Sparse expert layers for language models: replacing dense FFNs, top-k routing, expert choice, hash routing, balance loss, Z-loss, and expert parallelism.
CMU Advanced NLP Lecture 16: Reinforcement Learning for LLMs RL for language models through one-step and token-level MDP views, policy gradient, group-based advantages, PPO, cold-start fine-tuning, verifiable rewards, math reasoning, and RLHF.
CMU Advanced NLP Lecture 9: Decoding Algorithms Greedy decoding, beam search, MAP pitfalls, sampling, top-k, top-p, temperature, and KV-cache speedups for language model generation.
CMU Advanced NLP Lecture 2: Learned Representation Tokenization, token embeddings, CBOW, Deep CBOW, training losses, and a small sentiment-classification experiment comparing shallow and deeper bag-of-words models.
CMU Advanced NLP Lecture 1: Introduction and Fundamentals NLP system-building methods from rules to supervised learning and reinforcement learning, plus the common ingredients of parameterization, learning, inference, softmax probabilities, and generation.