transformers
Applied AI interview questions tagged transformers, across every topic.
8 questions · 3 unlocked for you
Concepts behind "transformers"
The curriculum that explains the ideas these questions test.
Core
The Transformer ArchitectureThe transformer is the architecture behind modern LLMs: stacked blocks that each mix information across tokens with self-attention and then transform each token with a feed-forward network, wrapped in residual connections and normalization. Understanding the two sub-layers (attention mixes across tokens, the feed-forward processes each one) explains where parameters live, why Mixture-of-Experts scales the feed-forward, and why decoder-only models dominate. Applied-AI interviews probe it because it is the mental scaffold for everything else, attention cost, KV cache, MoE, and serving.🧠 Foundations of LLMs & GenAISign in
Core
Attention and Self-AttentionAttention turns each token into a query, key, and value, scores every query against every key, softmaxes those scores into weights, and returns the weighted sum of values, so each token pulls in information from the others. Self-attention does this within one sequence. The all-pairs scoring is why cost grows with the square of sequence length, which in turn explains context limits, long-prompt expense, and the KV cache. Applied-AI interviews probe it because it links architecture to cost and latency in one mental model.🧠 Foundations of LLMs & GenAISign in
Core
Positional Encodings (RoPE and ALiBi)Attention is order-blind, so models inject token position separately. Modern LLMs use relative schemes: RoPE rotates query/key vectors by an angle proportional to position so the attention score depends only on the offset between tokens, and ALiBi adds a distance penalty to attention scores. Both extrapolate to longer sequences far better than learned absolute positions, which is why RoPE-with-scaling is how context windows get extended. Applied-AI interviews probe it because it explains how long-context models are built.🧠 Foundations of LLMs & GenAISign in
