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?
6406536036766.
Only ''cat''
6406536036767.
'cat'' or ''dog''
6406536036768.
'cat'', ''dog'' or ''bird''
6406536036769.
'dog'', ''bird'' or ''fish''
A published solution is not available for this question yet.
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?
6406536036778.
Replace the [CLS] vector with an average of the top-4 attention heads
6406536036779.
Feed the [CLS] embedding into a linear layer with a sigmoid activation per
label
6406536036780.
Use token embeddings individually and classify each token
6406536036781.
Use the [SEP] token embedding for multi-label prediction
A published solution is not available for this question yet.
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?
6406536036782.
BERT, because it masks tokens and predicts them independently
6406536036783.
BART, because it is trained with text corruption and autoregressive
reconstruction
6406536036784.
GPT, because it is optimal for bidirectional correction
6406536036785.
BERT, because [CLS] captures global structure
A published solution is not available for this question yet.
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?
6406536036790.
GPU memory exhaustion
6406536036791.
Latency becoming quadratic in the output length
6406536036792.
Inability to perform parallel token generation
6406536036793.
Beam search collapsing to a single token
A published solution is not available for this question yet.
, how many learned positional vectors are required by the
following methods?
• Absolute Positional Encoding (APE)
• Relative Positional Encoding (RPE)
• ALiBi
• NoPE (No Positional Encoding)
6406536036810.
APE = 10, RPE = 19, ALiBi = 0, NoPE = 0
6406536036811.
APE = 10, RPE = 10, ALiBi = 19, NoPE = 0
6406536036812.
APE = 20, RPE = 19, ALiBi = 1, NoPE = 1
6406536036813.
APE = 10, RPE = 2T = 20, ALiBi = 10, NoPE = 0
A published solution is not available for this question yet.
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?
6406536036818.
APE
6406536036819.
RPE
6406536036820.
RoPE
6406536036821.
ALiBi
A published solution is not available for this question yet.
. 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?
A published solution is not available for this question yet.
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)
A published solution is not available for this question yet.
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.
6406536036831.
GPT cannot condition on future tokens during training because the causal
mask zeros out all attention to positions
6406536036832.
If two prefixes
and
have identical embeddings at all positions, GPT
must assign identical next-token distributions for both contexts
6406536036833.
Removing positional encodings would force GPT to treat all permutations of
the same set of tokens as equivalent contexts
6406536036834.
Causal masking ensures that the computational cost of training scales linearly
with sequence length
A published solution is not available for this question yet.