MauryaHub PYQ Practice

Large Language Models · End Term · Sep 2025 · AN

Large Language Models · End Term · Sep 2025 AN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 25 published solutions

Question 2 MCQ · 2.0 marks

A language model produces the following logits for the next token:
Source diagram or notation
Before sampling, the model applies: • Temperature scaling with
Source diagram or notation
• Top-K sampling with
Source diagram or notation
Which tokens are eligible to be sampled?
6406536025082.
Only ''apple''
6406536025083.
"apple'' or ''banana''
6406536025084.
"apple'', ''banana'' or ''grape''
6406536025085.
"apple''or ''grape''

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 2.0 marks

A neural network layer produces activations of hidden dimension
Source diagram or notation
. You consider two normalization strategies: 1. Batch Normalization 2. Layer Normalization Which option correctly states the number of trainable parameters added by each normalization method?
6406536025086.
BatchNorm adds
Source diagram or notation
parameters, LayerNorm adds
Source diagram or notation
parameters
6406536025087.
BatchNorm adds
Source diagram or notation
parameters, LayerNorm adds
Source diagram or notation
parameters
6406536025088.
BatchNorm adds
Source diagram or notation
parameters, LayerNorm adds
Source diagram or notation
parameters
6406536025089.
BatchNorm adds
Source diagram or notation
parameters, LayerNorm adds
Source diagram or notation
parameters
6406536025090.
Both add 0 trainable parameters

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 2.0 marks

A sub-word vocabulary is being constructed using the WordPiece algorithm. The following tokens and their frequencies are extracted: • replay (frequency = 100) • replus (frequency = 3) The current vocabulary includes the tokens:
Source diagram or notation
Two candidate merges are under consideration: • Merge A:
Source diagram or notation
• Merge B:
Source diagram or notation
Which of the above merges are most possible based on the WordPiece tokenizer?
6406536025091.
Merge
Source diagram or notation
6406536025092.
Merge
Source diagram or notation
6406536025093.
Insufficient information to determine

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 2.0 marks

For a 4-category classification task, how would you use BERT's output?
6406536025094.
Use all token embeddings and average them.
6406536025095.
Use the [CLS] token embedding as input to a classification layer.
6406536025096.
Use only the [SEP] token
6406536025097.
Use the [MASK] token predictions.

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 2.0 marks

A hospital wants to extract disease mentions and treatment plans from unstructured clinical notes. Notes use heavy abbreviations like ``pt dx w/ CAD, rx aspirin'' For extracting specific disease names from text, which task should you fine-tune BERT for?
6406536025098.
Masked Language Modeling
6406536025099.
Next Sentence Prediction
6406536025100.
Named Entity Recognition
6406536025101.
Text generation

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 2.0 marks

Consider a sequence of length
Source diagram or notation
and a local block attention mechanism with
Source diagram or notation
blocks. If the attention matrix is restricted to only the main diagonal blocks (non-overlapping), what is the computational complexity of the self-attention operation for one layer (ignoring linear projections)? Assume
Source diagram or notation
be the model dimension.
6406536025102.Source diagram or notation
6406536025103.Source diagram or notation
6406536025104.Source diagram or notation
6406536025105.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 3.0 marks

Match the positional encoding method (Column A) with its property/behavior (Column B). **Column A (Methods)** 1. APE 2. RPE 3. RoPE 4. ALiBi 5. NoPE **Column B (Properties / Observations)** A. Works even on sequence lengths far beyond training length without retraining, because attention bias grows proportionally to token distance. B. Even if the model sees sequences only up to length 512 during training, it fails badly at length 1024, because positions above 512 have never had embeddings learned. C. Creates an implicit rotation such that the attention score between positions
Source diagram or notation
and
Source diagram or notation
depends only on the difference
Source diagram or notation
, not the positions themselves. D. Uses a fixed-size bank of distance embeddings such that two attention pairs
Source diagram or notation
and
Source diagram or notation
with the same distance use the same embedding. E. The model becomes permutation-invariant, meaning it treats ''cat sat mat'' the same as ``mat cat sat''.
6406536025106.
1
Source diagram or notation
B, 2
Source diagram or notation
D, 3
Source diagram or notation
C, 4
Source diagram or notation
A, 5
Source diagram or notation
E
6406536025107.
1
Source diagram or notation
D, 2
Source diagram or notation
A, 3
Source diagram or notation
B, 4
Source diagram or notation
C, 5
Source diagram or notation
E
6406536025108.
1
Source diagram or notation
B, 2
Source diagram or notation
C, 3
Source diagram or notation
A, 4
Source diagram or notation
D, 5
Source diagram or notation
E
6406536025109.
1
Source diagram or notation
E, 2
Source diagram or notation
D, 3
Source diagram or notation
A, 4
Source diagram or notation
C, 5
Source diagram or notation
B

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 2.0 marks

A 2D vector
Source diagram or notation
is rotated by
Source diagram or notation
using RoPE. What is the resulting vector?
6406536025110.Source diagram or notation
6406536025111.Source diagram or notation
6406536025112.Source diagram or notation
6406536025113.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 2.0 marks

If a model uses RoPE, increasing the sequence length from 100 to 1000 requires:
6406536025114.
900 more positional vectors
6406536025115.Source diagram or notation
RPE matrices
6406536025116.
No new parameters
6406536025117.
A new embedding matrix

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 2.0 marks

In a sequence of length
Source diagram or notation
, how many different attention pairs produce a distance of
Source diagram or notation
?
6406536025118.Source diagram or notation
6406536025119.Source diagram or notation
6406536025120.Source diagram or notation
6406536025121.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 2.0 marks

For a sequence of length
Source diagram or notation
, how many Absolute Positional Encoding (APE) vectors are needed, and how many Relative Positional Encoding (RPE) vectors are required?
6406536025122.
APE = 6, RPE = 11
6406536025123.
APE = 6, RPE = 6
6406536025124.
APE = 12, RPE = 11
6406536025125.
APE = 5, RPE = 12

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 2.0 marks

A model with positional encoding crashes when the input length exceeds the training max length. Which encoding is it most likely using?
6406536025126.
ALiBi
6406536025127.
APE
6406536025128.
RoPE
6406536025129.
RPE

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 3.0 marks

If the unmodified attention score is
Source diagram or notation
, then ALiBi changes it to:
6406536025130.Source diagram or notation
where bias is a learnable parameter.
6406536025131.Source diagram or notation
6406536025132.Source diagram or notation
6406536025133.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MSQ · 3.0 marks

Which of the following decoding method(s) can generate a different output every time you run the model with the same prompt?
6406536025134.
Greedy decoding
6406536025135.
Beam search with beam width = 1
6406536025136.
Top-p sampling with temperature T = 1
6406536025137.
Top-p sampling with temperature T
Source diagram or notation
1
6406536025138.
Beam search with beam width
Source diagram or notation
1

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 2.0 marks

Which of the following methods modifies/modify the attention scores AFTER computing
Source diagram or notation
?
6406536025139.
RoPE
6406536025140.
APE
6406536025141.
ALiBi
6406536025142.
None of these

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 3.0 marks

Consider a BART encoder with sequence length
Source diagram or notation
and hidden size
Source diagram or notation
(fixed). Now suppose the sequence length is doubled from
Source diagram or notation
to
Source diagram or notation
, keeping all other parameters unchanged. Which of the following statements are true?
6406536025143.
Self-attention FLOPs increase by a factor of
Source diagram or notation
.
6406536025144.
Self-attention FLOPs increase by a factor of
Source diagram or notation
.
6406536025145.
FFN FLOPs increase by a factor of
Source diagram or notation
.
6406536025146.
FFN FLOPs increase by a factor of
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 NAT · 2.0 marks

You are implementing a custom Block Sparse Attention kernel. Given a sequence length
Source diagram or notation
and block size
Source diagram or notation
, you decide to compute the main diagonal blocks plus one random off-diagonal block for each block-row. How many total
Source diagram or notation
block computations are performed?

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MSQ · 2.0 marks

Which of the following statements accurately describes the properties and computational complexities of the various sparse and block attention mechanisms?
6406536025148.
Strided Local Attention reduces the computational complexity from quadratic to linear, specifically
Source diagram or notation
where
Source diagram or notation
is the window size.
6406536025149.
Dilated Attention increases the computational complexity significantly compared to standard Strided Local Attention because it covers a wider receptive field.
6406536025150.
Global, Random, and Local Window attention patterns handle long sequences well.
6406536025151.
Empirical observations suggest that random permutations of blocks are significantly more important for performance than the identity permutation.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 NAT · 2.0 marks

In the standard Transformer with 6 Encoder Layers, how many distinct sets of transformation weight matrices (
Source diagram or notation
) are learned in the entire Encoder stack, assuming 8 heads per layer?

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 NAT · 2.0 marks

Suppose you are working on prefix language modeling. The sequence length is 10 and the first two tokens represent the task-specific prefix. How many non-infinity elements are there in the mask for computing attention scores?

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 NAT · 2.0 marks

You are configuring a Large Language Model (LLM) for inference and need to estimate the memory footprint of the KV Cache. Calculate the KV cache memory required per token (in Bytes) given the following model architecture: • Number of Layers (
Source diagram or notation
): 32 • Number of Heads (
Source diagram or notation
): 16 • Head Dimension (
Source diagram or notation
): 128 • Precision: 2 Bytes (FP16)

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 1.0 marks

A team is developing a new large language model (LLM) for code generation, focusing on an autoregressive (AR) approach using the Causal Language Modeling (CLM) objective. They implement a standard Transformer decoder-only architecture.The team is training the model on a sequence of tokens
Source diagram or notation
, where
Source diagram or notation
is the total length. The CLM objective aims to maximize the following log-likelihood:
Source diagram or notation
During training, they strictly enforce teacher forcing, meaning the ground-truth previous tokens are always provided as input to predict the current token. Based on the above setup, answer the given subquestions.
Which of the following describes the fundamental training mechanism of this model?
6406536025155.
The model predicts the entire sequence
Source diagram or notation
simultaneously without considering dependencies.
6406536025156.
The model predicts the token
Source diagram or notation
based only on the tokens
Source diagram or notation
up to
Source diagram or notation
.
6406536025157.
The model predicts a masked token
Source diagram or notation
based on both the left and right context tokens.

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 1.0 marks

A team is developing a new large language model (LLM) for code generation, focusing on an autoregressive (AR) approach using the Causal Language Modeling (CLM) objective. They implement a standard Transformer decoder-only architecture.The team is training the model on a sequence of tokens
Source diagram or notation
, where
Source diagram or notation
is the total length. The CLM objective aims to maximize the following log-likelihood:
Source diagram or notation
During training, they strictly enforce teacher forcing, meaning the ground-truth previous tokens are always provided as input to predict the current token. Based on the above setup, answer the given subquestions.
During the training phase on a sequence
Source diagram or notation
of length
Source diagram or notation
, how does the teacher forcing mechanism specifically relate to the calculation of the loss function
Source diagram or notation
?
6406536025158.
It means the model uses its own previous predictions
Source diagram or notation
as input to predict
Source diagram or notation
.
6406536025159.
It dictates that the loss is only calculated for tokens that were incorrectly predicted.
6406536025160.
It ensures that for every prediction
Source diagram or notation
, the model is conditioned on the ground-truth sequence
Source diagram or notation
.
6406536025161.
It allows the model to see future tokens
Source diagram or notation
when predicting
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 MCQ · 1.0 marks

A team is developing a new large language model (LLM) for code generation, focusing on an autoregressive (AR) approach using the Causal Language Modeling (CLM) objective. They implement a standard Transformer decoder-only architecture.The team is training the model on a sequence of tokens
Source diagram or notation
, where
Source diagram or notation
is the total length. The CLM objective aims to maximize the following log-likelihood:
Source diagram or notation
During training, they strictly enforce teacher forcing, meaning the ground-truth previous tokens are always provided as input to predict the current token. Based on the above setup, answer the given subquestions.
In the inference phase (when the model is used for generation), why is the teacher forcing technique not used, and what is the primary challenge this introduces?
6406536025162.
Teacher forcing is used, but only with a small probability.
6406536025163.
It's not used because the ground-truth sequence is unknown; this introduces the exposure bias problem, where the model is unfamiliar with its own prediction errors.
6406536025164.
It's not used because it drastically slows down the inference speed.
6406536025165.
It's not used; the challenge is the need for a separate encoder-decoder architecture.

A published solution is not available for this question yet.

Report a correction for Q25

Question 26 MCQ · 1.0 marks

A team is developing a new large language model (LLM) for code generation, focusing on an autoregressive (AR) approach using the Causal Language Modeling (CLM) objective. They implement a standard Transformer decoder-only architecture.The team is training the model on a sequence of tokens
Source diagram or notation
, where
Source diagram or notation
is the total length. The CLM objective aims to maximize the following log-likelihood:
Source diagram or notation
During training, they strictly enforce teacher forcing, meaning the ground-truth previous tokens are always provided as input to predict the current token. Based on the above setup, answer the given subquestions.
Which component of the Transformer decoder is essential for enforcing the Causal Language Modeling constraint?
6406536025166.
The Feed-Forward Network layer.
6406536025167.
The Positional Encoding layer.
6406536025168.
The masked Self-Attention layer.
6406536025169.
The Cross-Attention layer.

A published solution is not available for this question yet.

Report a correction for Q26