Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
LLM and Transformers for Interviews: Architecture and Theory
Hot & New
New
Rating: 4.8 out of 5(4 ratings)
56 students

LLM and Transformers for Interviews: Architecture and Theory

LLM, Transformers, NLP, Deep Learning, GPT, BERT, LSTM, RNN, DeepSeek, Generative AI, Attention, LLM Interview Prep
Last updated 11/2026
English
English

What you'll learn

  • Explain how an LLM turns text into tokens and vectors: BPE, byte-level BPE, embeddings and word2vec
  • Trace sequence models from the RNN to LSTM, GRU and seq2seq, and say why vanishing gradients made them forget
  • Explain attention step by step: query, key and value, scaled scores, softmax and the attention matrix
  • Draw the full Transformer from Attention Is All You Need: multi-head attention, positions, residuals and masks
  • Compare BERT, GPT and T5, and explain greedy decoding, beam search, temperature, top-k and top-p sampling
  • Explain scaling laws, Chinchilla and in-context learning, and how SFT, RLHF, DPO and LoRA make an assistant
  • Read a modern block: RMSNorm, SwiGLU, RoPE, KV cache, GQA, MLA, sliding windows, linear attention, long context
  • Explain Mixture of Experts, count parameters from a config.json, and size the weights and the KV cache in memory
  • Explain quantization and reasoning models: GPTQ, AWQ, GGUF, NF4, chain of thought, GRPO and DeepSeek-R1
  • Read benchmark scores and model cards critically, tear down open models, and answer LLM interview questions

Course content

17 sections • 152 lectures • 9h 0m total length
  • Welcome: What You Will Be Able to Explain3:51

    See the path this course takes, from words as numbers to reading real open models, watch Qwen3-8B drawn from its own config, and find out who this course is for.

    You learn tokens and embeddings, sequence models like RNN, LSTM and GRU, and the attention mechanism, then the full transformer architecture and the BERT, GPT and T5 families. You see how LLMs scale, how a base model becomes an assistant with SFT and RLHF, and what is inside a modern transformer block. Then you cover mixture of experts, LLM size and memory with the KV cache, quantization, reasoning models, benchmarks and evaluation, and teardowns of real models like Qwen and DeepSeek.

    The course ends with interview practice on LLM theory. The next lecture reads one model from end to end. If you get stuck anywhere, post your question in the Q&A section.

  • Walkthrough: One Model, Read End to End3:24
    Watch one real model read from end to end: GPT-2's tokenizer files and token ids, a word finding another through attention, a router picking experts, and a Qwen2.5-0.5B teardown.
  • How to Study This Course for Interviews3:04
    Learn how a lesson runs, from drawn scenes to model pages and notebook demos, and the habits that prepare you for interviews: think pauses, question cards, quizzes and cheat sheets.
  • Course Resources and Where Your Files Live2:57

    Find where your course files live: the cheat sheet PDFs and notebook demos attached to the lessons, how to keep them in one course folder, and the quizzes and practice tests ahead.

Requirements

  • You know what a neural network is and what training means (weights, a loss, gradient descent as an idea)
  • School maths is enough: every formula is drawn as a picture first, then filled in with real numbers
  • No coding is needed to follow along; the three short notebook demos explain every line they type
  • A computer with an internet connection; everything shown uses free, open models and free tools

Description

This course contains the use of artificial intelligence. Understand how large language models really work, from the first recurrent networks to the open models people use today, and learn to explain every part of them clearly in an interview or an exam.

This is a theory course with pictures. Each idea is drawn as a calm animated scene first, then written as a formula with real numbers. You follow one story, in order: how text becomes numbers, why RNNs and LSTMs forgot, how attention fixed it, the full Transformer, BERT, GPT and T5, the jump in scale with GPT-3, how ChatGPT-style assistants are trained, and then every part of a modern LLM, block by block.

Learn from the real thing

  • Real papers. Attention Is All You Need, BERT, GPT-2, GPT-3, the scaling law papers, InstructGPT, DPO, DeepSeek-R1 and more are shown on their real pages, with the sentence or number that matters highlighted as it is explained. Figures are redrawn and simplified so they read at a glance.
  • Real models. GPT-2 is the model for the foundations, and Qwen3-8B takes over when the course turns to assistants and modern LLMs. You see what a base model really writes before any tuning, and why an assistant answers differently.
  • Real configs. Parameter counts, memory sizes and KV cache sizes are worked out from each model's own config.json, not from a press release.
  • Real measurements. Three short notebooks tokenize real text, count and measure a model, and compare a 16-bit model with its 4-bit version, so the numbers on screen come from a real run.

Interview ready

Throughout the course, right after the idea it tests, you meet the questions companies and exams really ask, each answered in a few plain sentences you can say out loud. The last section shows how to answer an LLM theory question well, with two full practice tests with explained answers.

What you will cover

  • Words as numbers: tokens, byte pair encoding, GPT-2's byte-level BPE, embeddings, word2vec and why one vector per word is not enough.
  • Sequence models: the RNN step by step, vanishing gradients, LSTM gates, GRU, and seq2seq encoders and decoders.
  • Attention: alignment attention, self-attention, query, key and value, scaled scores, softmax and the cost of the attention matrix.
  • The Transformer in full: multi-head attention, positional encoding, the feed-forward block, residual connections and LayerNorm, the causal mask, cross-attention, and how vectors become the next token.
  • Three families: ELMo, BERT, GPT and T5, encoder-only versus decoder-only, and how a model writes with greedy decoding, beam search, temperature, top-k and top-p sampling.
  • Scale: GPT-2, GPT-3 and in-context learning, scaling laws, Chinchilla, and what scale gives and what it does not.
  • From model to assistant: supervised fine-tuning, reward models, RLHF in InstructGPT and ChatGPT, DPO, and full fine-tuning versus LoRA.
  • The modern transformer block: pre-norm and RMSNorm, SwiGLU, RoPE, the KV cache, MQA and GQA, multi-head latent attention (MLA), sliding windows, sparse and compressed attention, linear attention and hybrid stacks, and long context.
  • Mixture of Experts: the router, total versus active parameters, load balancing, and fine-grained and shared experts.
  • Size and memory: reading a config.json, counting parameters, memory for weights and the KV cache, prefill and decode, FlashAttention, and memory for training.
  • Quantization: number formats from FP32 to 4 bit, scale and zero point, per tensor, per channel and per group, GPTQ, AWQ, GGUF and NF4, and the names on model pages.
  • Reasoning models: chain of thought, test-time compute, verifiable rewards, GRPO, DeepSeek-R1 step by step, and distillation.
  • Benchmarks and evaluation: what a score really is, MMLU, GPQA, AIME, HumanEval, LiveCodeBench and SWE-bench, arena rankings and model judges, contamination and saturation, and how to read a model card.
  • Model teardowns: Qwen2.5-0.5B, SmolLM3, gpt-oss, Gemma, DeepSeek, Qwen and Kimi, each taken apart from its real config, so you can tear down the next model yourself.

By the end, you will be able to open any new open model's page and config, name each part of its architecture, estimate its size and memory, judge its benchmark claims, and explain all of it in plain words.

This course does not build a model from scratch, does not cover serving LLMs at scale, and has no fine-tuning code. It is the theory underneath all three.

Who this course is for:

  • Learners preparing for machine learning, LLM, AI engineer or generative AI interviews with theory questions
  • Students and engineers who use ChatGPT or open models and want to know how they really work inside
  • Data scientists and ML engineers who learned RNNs or BERT and want to catch up on modern LLM architectures
  • University students taking an NLP or deep learning course who want clear pictures and exam-style answers
  • Developers who build with LLMs and want to read model cards, configs, benchmarks and quantized model names