AIInterviewTraining logoAIInterview/Training

transformers

AI, ML & GenAI interview questions tagged transformers, across every topic.

12 questions · 3 unlocked for you

Concepts behind "transformers"

The curriculum that explains the ideas these questions test.

Core
🧠 Foundations of LLMs & GenAISign in
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. Grasping 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. AI, ML, and GenAI engineer interviews probe it because it is the mental scaffold for everything else, attention cost, KV cache, MoE, and serving.
Core
🧠 Foundations of LLMs & GenAISign in
Attention and Self-AttentionAttention casts each token as 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 draws 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 then explains context limits, long-prompt expense, and the KV cache. AI, ML, and GenAI engineer interviews probe it because it ties architecture to cost and latency in one mental model.
Core
🧠 Foundations of LLMs & GenAISign in
Positional Encodings (RoPE and ALiBi)Attention is order-blind, so models inject token position separately. Modern LLMs rely on relative schemes: RoPE rotates query/key vectors by an angle proportional to position so the attention score hinges 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. AI, ML, and GenAI engineer interviews probe it because it explains how long-context models are built.