Course Summary
Foundation Models (Niepert, Staab and Mualem, University of Stuttgart) covers models trained once on broad data and reused for many tasks: how pretraining and adaptation produce reusable capabilities, how architectures and objectives fit text, images and actions, how to evaluate such systems honestly, and what their reliability, safety and cost look like in practice.
The material overlaps with the MPL course on transformers, CLIP, VAEs, GANs and diffusion; those notes go deeper on the architectures.
Lecture Notes
-
(y-01) Introduction and Course Organization
What a foundation model is, pretraining signals (next token, masked, contrastive), adaptation, LLM versus VLM versus VLA, current systems, reasoning at inference time, tool-using agents, CLIP, DINOv3 and SAM 3, image and video generation, robot foundation models, applications with evidence of outcomes, societal challenges and prompt injection, plus exercises, presentations and exam eligibility. -
(y-02) Machine Learning Basics
Training versus inference, learning signals, tensors, losses, population versus empirical risk, data splits and leakage, bias and variance, regularization, linear and logistic regression, gradient descent by hand, cross-entropy and softmax, MLPs and backpropagation, residuals and layer norm, CNNs (stride, padding, pooling, receptive fields), embeddings, a first look at self-attention, and pretraining versus adaptation. -
(y-03) From Counting to Predicting: Statistical Language Models
Shannon’s guessing game, the chain rule, Zipf’s and Heaps’ laws and why sparsity cannot be avoided, n-gram models with MLE, add-k, interpolation and Kneser-Ney, cross-entropy, perplexity and the link to compression, tokenizer-dependent perplexity, distributional semantics, Bengio’s neural LM, word2vec and its biases, RNN language models, the encoder-decoder bottleneck and attention. -
(y-04) Data and Tokens
Scale and sources of pretraining text and the coming data shortage, the FineWeb curation pipeline, heuristic and model-based quality filters, harmful content and who filtering hurts, deduplication with Jaccard similarity, MinHash and banding, decontamination and the EU AI Act, data mixtures, annealing and synthetic data, byte-pair encoding by hand, tokenizer families, token costs across languages, digits and glitch tokens, the Byte Latent Transformer, and judging data with small-model ablations. -
(y-05) From Attention to Modern LLMs
Attention as weighted averaging computed by hand, kernel regression and least squares as attention, multi-head attention, the transformer block and residual stream, why attention ignores word order, BERT versus GPT (masks, cloze, next token), counting parameters, the modern block (RMSNorm, GELU, SwiGLU, RoPE, GQA, MLA), mixture of experts with total versus active parameters and load balancing, KV-cache arithmetic, lost in the middle, FlashAttention with its online softmax, and sliding-window attention. -
(y-06) Pretraining and Scaling
Next-token versus masked-token objectives and why decoders won, concept lattices from BERT, multi-token prediction, training compute with 6ND, AdamW versus Muon, learning-rate schedules and annealing, mixed precision down to FP8, loss spikes and QK-norm, data, tensor, pipeline and expert parallelism, mid-training and context extension with RoPE, power-law scaling, Chinchilla’s 20 tokens per parameter and training longer for cheap serving, emergence as a metric effect, long-horizon execution, in-context learning, and evaluating base models. -
(y-07) Post-Training I: The Aligned Assistant
Base model versus assistant, chat templates, SFT with loss on the answer only, instruction data and Tülu 3, LoRA and counting its parameters, catastrophic forgetting, task vectors and the chat vector, RLHF as in InstructGPT (reward model, Bradley-Terry loss, PPO with a KL leash, reward hacking and sycophancy), DPO and why it matches RLHF, SimPO, KTO and ORPO, Constitutional AI, safety training and evolutionary soups, red teaming, GCG, PAIR and many-shot jailbreaks, constitutional classifiers, emergent misalignment, and evaluating assistants with BLEU, Elo win rates, LLM judges and two safety error rates.
Assessment Map
| Component | Weight / Gate | Notes |
|---|---|---|
| Exercise sheets | 8 of 11 valid attempts | A genuine, clearly labeled attempt at two or more subtasks per sheet, submitted individually by Sunday 23:59. |
| Presentation | At least 1 successful | Random selection among submitters in your tutorial group; two strikes make you ineligible. |
| Final exam | 100% of the grade | Details on ILIAS. |