NVIDIA Certified Associate – Generative AI and LLMs — Question 3

In large-language models, what is the purpose of the attention mechanism?

Answer options

Correct answer: D

Explanation

The attention mechanism's primary function is to assign weights to each word in the input sequence, allowing the model to focus on relevant words when generating output. Options A, B, and C describe related concepts but do not accurately capture the attention mechanism's role of weighting input words.