Which technique allows a large language model to be adapted to a specific task by updating only a small number of additional parameters while keeping the original model weights frozen?
Answer: B
Parameter-Efficient Fine-Tuning (PEFT) methods such as LoRA (Low-Rank Adaptation) adapt a pretrained model to a downstream task by injecting trainable low-rank matrices into the model layers while keeping the original weights frozen. This drastically reduces the number of trainable parameters compared to full fine-tuning, saving memory and compute. Full fine-tuning updates all weights, and pretraining from scratch trains a model anew. RLHF is a separate alignment technique, not primarily a parameter-efficiency method.
Q.2Medium
In the context of transformer-based LLMs, what does the term 'context window' refer to?
Answer: B
The context window (or context length) of an LLM refers to the maximum number of tokens — including both the input prompt and the generated output — that the model can handle at one time. Tokens beyond this limit are not attended to. It is determined by the positional encoding scheme and memory constraints, not by the number of layers, vocabulary size, or batch size.
Q.3Medium
Which decoding strategy for text generation picks the next token by sampling only from the top-K most probable tokens at each step?
Answer: C
Top-K sampling restricts the sampling pool to the K tokens with the highest predicted probabilities at each generation step, then samples from that restricted set. Greedy decoding always picks the single highest-probability token. Beam search maintains multiple candidate sequences simultaneously. Temperature scaling adjusts the sharpness of the probability distribution but does not by itself restrict sampling to a top-K subset.
Q.4Medium
What is the primary purpose of Reinforcement Learning from Human Feedback (RLHF) in training models like ChatGPT?
Answer: C
RLHF fine-tunes a pretrained language model using a reward model trained on human preference data (comparisons of model outputs). A reinforcement learning algorithm — typically Proximal Policy Optimization (PPO) — then updates the LLM to maximize this reward, steering its outputs to be more helpful, harmless, and honest. It does not directly affect vocabulary size, model compression, or pretraining speed.
Q.5Medium
In a transformer model, what does 'multi-head attention' allow the model to do compared to single-head attention?
Answer: B
Multi-head attention splits the model dimension into multiple heads, each learning a separate set of query, key, and value projections. This allows the model to jointly attend to information from different representation subspaces at different positions — capturing varied relationships (syntactic, semantic, coreference, etc.) in parallel. Single-head attention is limited to one such subspace. Multi-head attention does not eliminate positional encoding, reduce parameters through sharing, or remove feed-forward layers.
Q.6Medium
Which of the following best describes 'hallucination' in the context of large language models?
Answer: B
Hallucination in LLMs refers to the phenomenon where the model generates text that sounds confident and coherent but contains factual errors, made-up citations, or entirely fabricated content not grounded in the training data or provided context. It is distinct from refusals (safety filters), repetition loops (a different failure mode), or multilingual limitations.
Q.7Medium
What is Retrieval-Augmented Generation (RAG) primarily designed to address in large language models?
Answer: C
RAG combines a retrieval component (typically a vector database or search engine) with a generative LLM. At inference time, relevant documents or passages are retrieved based on the user query and provided as context to the LLM, allowing it to ground its responses in current or specialized information not present in its training data. It does not reduce model parameters, speed up tokenization, or enable image generation.
Q.8Medium
Which of the following tokenization methods is most commonly used in modern LLMs such as GPT-4 and LLaMA?
Answer: C
Most state-of-the-art LLMs use Byte-Pair Encoding (BPE) or closely related subword tokenization methods such as WordPiece or SentencePiece. BPE iteratively merges the most frequent pairs of characters or subword units, balancing vocabulary size against the ability to represent rare and unknown words. Pure character-level and word-level tokenization are generally less efficient for large-scale models, and sentence-level tokenization is too coarse.
Q.9Medium
In prompt engineering, what is 'few-shot prompting'?
Answer: B
Few-shot prompting is an in-context learning technique where a handful of example input-output pairs are included directly in the prompt before the actual query. This helps the model understand the desired format, style, or reasoning pattern without any gradient-based training. It differs from fine-tuning (which updates weights), learning rate choices, or output length restrictions.
Q.10Medium
Which scaling law finding, commonly associated with Kaplan et al. (OpenAI), describes the relationship between model performance and scale?
Answer: B
The neural scaling laws paper by Kaplan et al. (2020) demonstrated that language model performance (measured by cross-entropy loss) improves predictably as a power law function of three key factors: the number of model parameters, the size of the training dataset, and the amount of compute used. This insight guided the development of increasingly large models. Performance does not simply double with layers, plateau at a billion parameters, or scale only with data.