LLM Fundamentals interview questions
Core architectures, Transformer mechanics, self-attention, context windows, tokenization, KV cache, and sampling algorithms.
What to study
- Explain scaled dot-product attention and QKV projection math.
- Trade-offs between autoregressive (decoder-only) vs encoder-decoder models.
- How KV caching eliminates redundant recomputation during inference.
Questions and answers
What is KV Cache and how does it speed up inference?
Intermediate · 3 min read
How does Grouped-Query Attention (GQA) differ from Multi-Head Attention (MHA)?
Intermediate · 2 min read
What is the difference between encoder-only, decoder-only, and encoder-decoder LLMs?
Beginner · 2 min read
How does Byte-Pair Encoding (BPE) tokenization work?
Beginner · 2 min read
How do Rotary Position Embeddings (RoPE) and RoPE scaling work?
Advanced · 2 min read
What is Temperature, Top-p, and Top-k sampling?
Beginner · 2 min read
What is the difference between greedy decoding and beam search?
Beginner · 2 min read
What is a context window and how does it limit LLM processing?
Beginner · 2 min read
How does Multi-Query Attention (MQA) differ from Multi-Head Attention?
Intermediate · 2 min read
How does FlashAttention optimize memory and speed via tiling?
Advanced · 2 min read
What is tokenization and why can't LLMs process raw string characters directly?
Beginner · 2 min read
What is the difference between causal and bidirectional self-attention?
Beginner · 2 min read
What is a logit and how is it converted to token probabilities via Softmax?
Beginner · 2 min read
What is an attention mask and why is it needed during batch processing?
Beginner · 2 min read
What is positional encoding and why do Transformers need it?
Beginner · 2 min read
How do Mixture of Experts (MoE) architectures scale parameter count efficiently?
Intermediate · 2 min read
What is linear attention and how does it attempt to solve quadratic complexity?
Intermediate · 2 min read
How does sliding window attention (SWA) reduce memory usage in long-context models?
Intermediate · 2 min read
How do state space models (SSMs) like Mamba compare to Transformer self-attention?
Advanced · 2 min read
How does Differential Attention work to suppress noise and improve long-context focus?
Advanced · 2 min read