Skip to content
ml-recall

#language-modeling

1 question from PyTorch

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Single choice

mediumAI-checkedPyTorch

A GPT-style model returns logits of shape (B, T, V) for input_ids of shape (B, T), and every row of input_ids starts with a <start> token. The logits at position i must predict the token at position i + 1. Which pair do you pass to F.cross_entropy (after flattening)?

Choose one option