Lebanese American University
School of Arts & Sciences · Department of Computer Science and Mathematics
A course that traces how a machine learns to read — from words and tokens to transformers. Every deck is linked below, free to use.
Today's language models can write, translate, and answer questions — but none of it is magic. This course rebuilds that capability from the ground up, one idea at a time: how raw text becomes tokens, how early models learned to predict the next word, how machine learning and neural networks find patterns in data, and how embeddings and transformers turned those pieces into the systems that power the language models we use every day.
Slides build on two textbooks Speech and Language Processing 3rd ed., draft — Jurafsky & Martin Natural Language Processing: Neural Networks and Large Language Models — Xiao & Zhu
The curriculum
what NLP is, and how the field evolved into deep learning
morphemes, Unicode, regular expressions, and subword tokenization
language modeling with n-grams, and how to evaluate them
supervised learning, logistic regression, cross-entropy loss, and gradient descent
multi-layer networks, regularization, optimization, and a PyTorch walkthrough
lexical semantics, count-based vectors, cosine similarity, and Word2Vec
CNNs and RNNs for text — architectures, transfer learning, LSTMs and GRUs
attention, transformer blocks, training LLMs, sampling, and prompting
BERT, text classification, machine translation, and text generation
Found a mistake or a broken link in the slides — or have a question? Email me — corrections and questions are welcome.