📞 0339-0387701 (WhatsApp) Contact

« Back to Data Science & AI (NCCIA)

What is the role of the final layer in a decoder-only LLM?

A. To store the training data
B. To tokenize the input
C. To convert the last hidden representation into probabilities over the vocabulary for the next token ✅
D. To delete the context

Correct Answer: C. To convert the last hidden representation into probabilities over the vocabulary for the next token

Explanation

A final linear layer plus softmax, often called the language-model head, predicts the next token.