uiz Space

January 2026 term · Introduction to Deep Learning and Generative AI · BSDA2001

Introduction to Deep Learning and Generative AI End Term: 10 May 2026, Set 1 (January 2026 term)

The IIT Madras BS Introduction to Deep Learning and Generative AI (Deep Learning and GenAI) End Term paper sat on 10 May 2026, in the January 2026 term, set 1: 24 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
24
Marks
100
Duration
180 min
MCQ
14
MSQ
8
Numerical
2

Updated

Official paper: Introduction To Deep Learning And Generative Ai 06 May 26 (Session 2) · No negative marking.

Question 1

+4 marksOne correct option

Which of the following is the MOST correct way to run a trained model on test data?

  1. A

    y = model(X_test)

  2. B

    model.eval() y = model(X_test)

  3. C

    with torch.no_grad(): y = model(X_test)

  4. D

    model.eval() with torch.no_grad(): y = model(X_test)

Show answer

Correct answer

  • D

    model.eval() with torch.no_grad(): y = model(X_test)

Question 2

+4 marksOne correct option

Consider the sentence:
"Data science is fun"
In a bigram language model, which probability expression correctly represents the probability of the word "is"?

  1. A

    P(is | Data, science)

  2. B

    P(is | science)

  3. C

    P(is | fun)

  4. D

    P(is | science, fun)

Show answer

Correct answer

  • B

    P(is | science)

Question 3

+4 marksOne correct option

We are given the Q, K, V matrices to compute the scaled dot product attention matrix for a transformer.
Keeping everything else same we double every value in the V matrix.
How will this change the scaled dot product attention scores that are computed?

  1. A

    There won't be any change to the attention scores.

  2. B

    Attention scores will double.

  3. C

    Attention scores will get halved.

  4. D

    Attention scores will change but we can't determine how much they will change without checking the actual values of the V matrix.

Show answer

Correct answer

  • A

    There won't be any change to the attention scores.

Question 4

+4 marksOne correct option

Consider the following code representing a component of a traditional encoder decoder model which uses Bahdanau attention:

Which of the following completes the missing line?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 5

+4 marksOne correct option

What is the output of the following code?

  1. A

    (2,3,4)

  2. B

    (0,2,1)

  3. C

    (2,4,3)

  4. D

    (4,2,3)

Show answer

Correct answer

  • A

    (2,3,4)

Question 6

+4 marksOne correct option

Consider an attention mechanism defined as:
Attention(Q, K, V) = softmax(QKT) V
Which of the following is the most likely consequence of removing the scaling factor in this attention computation?

  1. A

    The attention scores become smaller, leading to uniform attention weights.

  2. B

    The dot product values grow large, causing the softmax to produce extremely peaked distributions and unstable gradients.

  3. C

    The model becomes invariant to the dimensionality of key vectors.

  4. D

    The attention mechanism works as usual.

Show answer

Correct answer

  • B

    The dot product values grow large, causing the softmax to produce extremely peaked distributions and unstable gradients.

Question 7

+4 marksOne correct option
  1. A

    Set shuffle=False

  2. B

    Increase batch_size to 64

  3. C

    Set drop_last=True

  4. D

    Set num_workers=0

Show answer

Correct answer

  • C

    Set drop_last=True

Question 8

+4 marksOne correct option

What is the primary capability that the Position-wise Feed-Forward Network (FFN) provides to the Transformer architecture?

  1. A

    The ability to attend to other tokens in the sequence and capture dependencies between words

  2. B

    The ability to preserve and utilize positional information about token order

  3. C

    The ability to apply non-linear transformations and learn complex feature interactions within each token's representation

  4. D

    The ability to mix information across different positions in the sequence

Show answer

Correct answer

  • C

    The ability to apply non-linear transformations and learn complex feature interactions within each token's representation

Question 9

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 10

+4 marksOne correct option

A transformer model has the following embedding layer: Vocabulary size = 50,000• Embedding dimension = 768• The embeddings are currently stored in float32 format.
You decide to optimize memory as follows: Quantize 70% of the embedding vectors to int81. Keep the remaining 30% in float32 (for high-frequency tokens)2. What is the overall percentage reduction in memory for the embedding matrix?
(Round to the nearest integer)

  1. A

    52%

  2. B

    60%

  3. C

    53%

  4. D

    65%

Show answer

Correct answer

  • C

    53%

Question 11

+4 marksOne correct option

Consider the following code:

Which of the following describes the output of decoded_texts?

  1. A

    The output will return decoded text strings with special tokens like [CLS] and [SEP] removed.

  2. B

    The output will include [CLS] and [SEP] tokens explicitly in each string.

  3. C

    The output will be a list of token IDs instead of strings and exclude special tokens.

  4. D

    The output will return the tokenized words but still include padding tokens.

Show answer

Correct answer

  • A

    The output will return decoded text strings with special tokens like [CLS] and [SEP] removed.

Question 12

+4 marksOne correct option

We use the following LORA code to finetune BERT model:

But we notice that the code does not work as intended. Which of the following parameters of the lora need to be changed to make it work as intended?

  1. A

    rank (r)

  2. B

    task_type

  3. C

    lora_dropout

  4. D

    lora_alpha

Show answer

Correct answer

  • B

    task_type

Question 13

+4 marksOne or more correct options

Which of the following are data augmentation techniques?

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answers

  • A
  • B
  • D

Question 14

+4 marksOne or more correct options

Consider the following optimization algorithms used for training neural networks: SGD with Momentum• RMSProp• Adam• Which of the following statements is/are correct?

Select all that apply.

  1. A

    SGD with Momentum accumulates an exponentially decaying moving average of past gradients to accelerate convergence along consistent directions.

  2. B

    Momentum methods adapt individual learning rates for each parameter based on past squared gradients.

  3. C

    RMSProp maintains a running average of squared gradients to scale learning rate.

  4. D

    Adam combines ideas from Momentum and RMSProp by using both first and second moment estimates of gradients.

  5. E

    Adam requires computing second-order derivatives of the loss function.

  6. F

    Adaptive methods such as RMSProp and Adam can use different effective learning rates for different parameters.

Show answer

Correct answers

  • A

    SGD with Momentum accumulates an exponentially decaying moving average of past gradients to accelerate convergence along consistent directions.

  • C

    RMSProp maintains a running average of squared gradients to scale learning rate.

  • D

    Adam combines ideas from Momentum and RMSProp by using both first and second moment estimates of gradients.

  • F

    Adaptive methods such as RMSProp and Adam can use different effective learning rates for different parameters.

Question 15

+4 marksOne or more correct options

Select the correct statement(s) regarding a CNN:

Select all that apply.

  1. A

    Increasing the number of kernels proportionately increases the size of the output feature map.

  2. B

    Increasing the number of kernels proportionately decreases the size of the output feature map.

  3. C

    Low padding and high stride are the ideal combination if we want to minimize the reduction of the feature map size.

  4. D

    Low padding and high stride are the ideal combination if we want to maximize the reduction of the feature map size.

Show answer

Correct answer

  • D

    Low padding and high stride are the ideal combination if we want to maximize the reduction of the feature map size.

Question 16

+4 marksOne or more correct options

Which of the following situations may lead to a mode collapse while training a GAN?

Select all that apply.

  1. A

    A GAN trained on MNIST generates only the digit '3' repeatedly, even though the dataset contains digits 0-9.

  2. B

    GAN generates limited variations of faces with similar expressions despite diverse training data.

  3. C

    The GAN underfits the training data.

  4. D

    The discriminator becomes accurate straightaway after training the GAN on just the first 5 images.

Show answer

Correct answers

  • A

    A GAN trained on MNIST generates only the digit '3' repeatedly, even though the dataset contains digits 0-9.

  • B

    GAN generates limited variations of faces with similar expressions despite diverse training data.

Question 17

+4 marksOne or more correct options

Consider the evaluation metrics commonly used for generative models: Fréchet Inception Distance (FID), Inception Score (IS), and CLIP Score.
Which of the following statements are correct?

Select all that apply.

  1. A

    FID compares the mean and covariance of real and generated feature distributions extracted from a pretrained Inception network.

  2. B

    Inception Score directly compares generated images with real images.

  3. C

    A lower FID score indicates that generated samples are closer to the real data distribution.

  4. D

    Inception Score rewards images that are both classifiable (low entropy conditional distribution) and diverse (high entropy marginal distribution).

  5. E

    CLIP Score requires real images to compute the metric.

  6. F

    CLIP Score measures alignment between generated images and their corresponding text prompts.

  7. G

    FID and Inception Score both explicitly evaluate text-image alignment.

Show answer

Correct answers

  • A

    FID compares the mean and covariance of real and generated feature distributions extracted from a pretrained Inception network.

  • C

    A lower FID score indicates that generated samples are closer to the real data distribution.

  • D

    Inception Score rewards images that are both classifiable (low entropy conditional distribution) and diverse (high entropy marginal distribution).

  • F

    CLIP Score measures alignment between generated images and their corresponding text prompts.

Question 18

+4 marksOne or more correct options

A text-to-image generative model is evaluated on three metrics with the following results: FID = 8.5• Inception Score (IS) = 2.1• CLIP Score = 0.34• For comparison, a strong baseline model on the same dataset achieves: FID = 15.2• IS = 6.8• CLIP Score = 0.31• Which of the following interpretations are correct?

Select all that apply.

  1. A

    The new model generates images that are statistically closer to the real data distribution than the baseline.

  2. B

    The new model produces more class-diverse samples than the baseline.

  3. C

    The new model likely generates less classifiable or less confident object predictions compared to the baseline.

  4. D

    The new model aligns slightly better with the provided text prompts than the baseline.

  5. E

    The higher CLIP score guarantees better perceptual image quality.

  6. F

    The baseline model likely generates more diverse categories of images than the new model.

Show answer

Correct answers

  • A

    The new model generates images that are statistically closer to the real data distribution than the baseline.

  • C

    The new model likely generates less classifiable or less confident object predictions compared to the baseline.

  • D

    The new model aligns slightly better with the provided text prompts than the baseline.

  • F

    The baseline model likely generates more diverse categories of images than the new model.

Question 19

+5 marksOne or more correct options

Consider an encoder-decoder architecture trained using maximum likelihood for sequence generation.
Which of the following statements are correct?

Select all that apply.

  1. A

    During training, the decoder may receive ground-truth tokens as inputs at subsequent time steps.

  2. B

    During inference, the decoder conditions on its own previously generated tokens.

  3. C

    Teacher forcing can be used during inference to give more accurate predictions.

  4. D
  5. E

    Beam search trades computational cost for a broader exploration of possible output sequences.

  6. F

    Beam search guarantees recovery of the globally optimal sequence for any fixed beam width.

Show answer

Correct answers

  • A

    During training, the decoder may receive ground-truth tokens as inputs at subsequent time steps.

  • B

    During inference, the decoder conditions on its own previously generated tokens.

  • D
  • E

    Beam search trades computational cost for a broader exploration of possible output sequences.

Question 20

+5 marksOne or more correct options

You want to reduce parameters in multi-head attention from 4,096 to 1,024. Which of the following changes achieve(s) this? (MSQ)

Select all that apply.

  1. A
  2. B
  3. C

    Reduce sequence length from 100 to 25

Show answer

Correct answer

  • B

Question 21

+5 marksOne correct option

Consider the following single-layer RNN:

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 22

+5 marksOne correct option

Consider the following PyTorch model:

Note: Do not round intermediate values.• Final answer can be rounded to 3 decimal places.•

  1. A

    -0.462

  2. B

    0.364

  3. C

    -0.364

  4. D

    -0.787

Show answer

Correct answer

  • C

    -0.364

Question 23

+4 marksNumerical answer
Show answer

Correct answer: 0.5 (accepted within ±0.1)

Question 24

+4 marksNumerical answer

A model is fine-tuned with the following configuration: dataset_size = 2048• batch_size = 16• epochs = 2• Assuming the optimizer performs exactly one update after a fixed number of gradient accumulation steps and 64 updates are performed, how many gradient accumulation steps were used during training?

Show answer

Correct answer: 4