CertKeen

NVIDIA Generative AI LLMs Associate (NCA-GENL) · Free practice question 1 of 12

Positional encoding in transformers

A student intern at Bramblecote Labs notices that self-attention by itself treats its input as an unordered set. What component lets a transformer use word order?

  1. A.A larger feed-forward layer inside each transformer block
  2. B.A dropout layer applied to the attention weights during training
  3. C.A softmax layer placed after the final output projection
  4. D.Position encodings, such as sinusoidal or rotary embeddings
Show answer and explanation

Correct answer: D. Position encodings, such as sinusoidal or rotary embeddings

Why: Attention compares tokens without regard to where they occur, so transformers inject position information, originally fixed sinusoidal encodings added to embeddings and now often learned or rotary position embeddings, so that order affects the computation. The output softmax turns logits into probabilities, feed-forward width adds capacity, and dropout is regularization; none of them encodes position.

More free NVIDIA Generative AI LLMs Associate (NCA-GENL) questions