Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : LARGE LANGUAGE MODELS (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
What happens when you use Batch Normalization with a batch size of 1?
Solution
A language model outputs the following logits for the next token:
{cat: 3.2, dog: 2.9, bird: 1.1, fish: 0.5, snake: -0.4}
Before sampling, the decoding pipeline performs:
- Temperature scaling with T = 2.0
- Top-K filtering with K = 3
After applying both steps, which tokens remain eligible for sampling?
{cat: 3.2, dog: 2.9, bird: 1.1, fish: 0.5, snake: -0.4}
Before sampling, the decoding pipeline performs:
- Temperature scaling with T = 2.0
- Top-K filtering with K = 3
After applying both steps, which tokens remain eligible for sampling?
Solution
If a model's next-token probabilities are
,
,
,
, and
, and Top-P is set to
. Which set of tokens will be included in the nucleus for sampling?
Solution
In a WordPiece vocabulary-building step, the corpus contains the following tokenized sequences:
-
-
The current vocabulary includes the tokens:
,
,
,
, 
Two candidate merges are being evaluated:
- Merge A:

- Merge B:

Based purely on WordPiece's likelihood-based merge selection, which merge is more likely to be chosen?
-
-
The current vocabulary includes the tokens:
Two candidate merges are being evaluated:
- Merge A:
- Merge B:
Based purely on WordPiece's likelihood-based merge selection, which merge is more likely to be chosen?
Solution
A research team wants to classify scientific abstracts into multiple topics simultaneously (e.g., ''ML'', ''biology'', ''statistics''), where each abstract may belong to more than one topic. They fine- tune BERT for this task. Which modification is MOST appropriate?
Solution
A company wants to automatically correct noisy OCR text extracted from scanned documents. The text contains spelling mistakes, missing words, and scrambled phrases. Which model should they fine-tune?
Solution
Computing the full self-attention matrix has a time complexity of

where
is the sequence length and
is the embedding dimension.
Which step in the self-attention mechanism is primarily responsible for this quadratic scaling?
where
Which step in the self-attention mechanism is primarily responsible for this quadratic scaling?
Solution
During autoregressive inference, key-value (KV) caching is used to avoid recomputing keys and values for previously generated tokens. If the KV cache is allowed to grow without any limit, which of the following failure modes can occur?
Solution
Consider a sequence of length
processed by a local
mechanism with block size
, where
is a multiple of
. The sequence is partitioned into
non-overlapping contiguous blocks, and self-attention is computed
(i.e., attention is restricted to the main diagonal blocks of the
attention matrix).
Ignoring the cost of linear projections for
, what is the time complexity of the self- attention operation for one layer in terms of
,
, and the head dimension
?
Ignoring the cost of linear projections for
Solution
A 2D vector
is rotated by
using RoPE. What is the resulting vector?
Solution
If a model uses Absolute Positional Embeddings (APE), increasing the sequence length from 100 to 1000 requires:
Solution
In a sequence of length
, how many different attention pairs produce a distance of
?
Solution
For a sequence of length
, how many learned positional vectors are required by the following methods?
- Absolute Positional Encoding (APE)
- Relative Positional Encoding (RPE)
- ALiBi
- NoPE (No Positional Encoding)
- Absolute Positional Encoding (APE)
- Relative Positional Encoding (RPE)
- ALiBi
- NoPE (No Positional Encoding)
Solution
Which of the following methods uses/use the concept: "The farther apart two tokens are, the less they should attend to each other''?
Solution
You trained a model with max sequence length 512. At inference, you need to process sequence length 4096 without retraining.
Which positional encoding will perform best out-of-the-box?
Which positional encoding will perform best out-of-the-box?
Solution
A model using ALiBi is extended from context length 1K
8K.
How many new ALiBi parameters are added?
How many new ALiBi parameters are added?
Solution
A mini-batch has
sentences, each padded to a length
. Self-attention (single head) computes one score matrix per sentence. How many scalar scores are computed in total for a single head across the batch?
Solution
Suppose you are working on prefix language modeling. The sequence length is
and the first two tokens represent the task-specific prefix. How many non-infinity elements are there in the mask for computing attention scores?
Solution
A model uses a hybrid attention pattern in which each token attends to:
- A local window of size
- A set of
random tokens,
- A set of
global tokens.
Compute the total number of attention computations per token (integer expression).
- A local window of size
- A set of
- A set of
Compute the total number of attention computations per token (integer expression).
Solution
During deployment of a transformer-based Large Language Model (LLM), you want to estimate the memory usage of the KV cache for efficient batching. Compute the KV-cache memory required per token (in Bytes) for the following model configuration:
- Number of Transformer Blocks (
): 24
- Attention Heads per Layer (
): 12
- Head Dimension (
): 96
- Precision used for KV tensors: 2 Bytes (FP16)
- Number of Transformer Blocks (
- Attention Heads per Layer (
- Head Dimension (
- Precision used for KV tensors: 2 Bytes (FP16)
Solution
You are implementing a custom Block Sparse Attention kernel. Given a sequence length
and block size
, you decide to compute the main diagonal blocks plus one random off-diagonal block for each block-row. How many total
block computations are performed?
Solution
A GPT-style causal language model is trained using the next-token prediction objective:

During inference, the model must generate tokens autoregressively from left to right using only past context.
Consider the following statements about GPT-style causal models.
During inference, the model must generate tokens autoregressively from left to right using only past context.
Consider the following statements about GPT-style causal models.
Solution
Under which of the following decoding settings can the model produce different outputs across multiple runs on the same prompt?
Solution
Consider a BART encoder with sequence length
and hidden size
(fixed).
Now suppose the sequence length is doubled from
to
, keeping all other parameters unchanged.
Which of the following statements are true?
Now suppose the sequence length is doubled from
Which of the following statements are true?
Solution
Shape
Thickness [ / ]
3
All colors