⚠
Privacy Notice: When you sign in with GitHub, your quiz attempts are stored in Google Firebase so you can track your progress. This data is only accessible to the course instructor, is not otherwise shared, and will be deleted at the end of the semester. For earlier deletion, contact the instructor. Prefer to stay anonymous? Use guest mode or a GitHub account without your real name.
Loading...

05 Lecture 5 Quiz: Inside the Transformer

Score: 0 / 14

Instructions

This is an interactive quiz. Sign in with GitHub to save your progress, or continue as a guest.

  • Select your answer for each question
  • Get immediate feedback on your choices
  • Retry questions as many times as you need
  • Track your progress across sessions
Question1 Forward Pass

What does a transformer produce per single forward pass over a prompt?

Question2 Embeddings

Why does a transformer convert token IDs into dense embedding vectors instead of feeding the integer IDs directly into the network?

Question3 Embeddings

The row of the embedding matrix for the token bank is the same fixed vector whether the surrounding sentence is about a river or about a savings account. What part of the architecture is responsible for distinguishing those two senses?

Question4 Geometry

What does the dot product a · b between two vectors of the same dimension actually measure?

Question5 Block Anatomy

Which sub-layer of a transformer block is the only one that mixes information across token positions?

Question6 Attention

In a single attention head, what is the role distinction between a token’s Key (K) and its Value (V)?

Question7 Attention

Why are the raw attention scores Q K^T divided by sqrt(d) before the softmax?

Question8 Attention

What is the role of the causal mask in a decoder-only LLM?

Question9 Multi-Head Attention

How does the parameter budget of multi-head attention compare to single-head attention at the same total dimension d?

Question10 Positional Encoding

Without any positional information added to the input, what would attention output for “the cat sat on the mat” versus “the mat sat on the cat”?

Question11 Feed-Forward Network

Within a single transformer block (attention + FFN), where do the majority of parameters live?

Question12 The Key Insight

The same trained transformer θ can process a 5-token prompt and a 5,000-token prompt. Architecturally, why?

Question13 Computational Cost

Doubling the input length T roughly quadruples the per-pass compute and memory for one transformer block. Which sub-layer is responsible for that quadratic-in-T scaling, and why?

Question14 Auto-Regressive Loop

To generate a 500-token response from a transformer, how many full forward passes through the network are required?

© 2026 Dominik Müller   •  Powered by Soopr   •  Theme  Moonwalk