Skip to content
ml-recall

#torch-tril

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

easyAI-checkedPyTorch

In an attention module, attn_mask[i, j] = 1 means token i may attend to token j, and 0 means it may not. Which line builds the mask that a GPT-style language model needs for a sequence of length T?

Choose one option