LLM Fine-Tuning and Alignment Questions
Adapting foundation models to specific tasks and desired behavior. Covers transfer learning and using pretrained models, full and parameter-efficient fine-tuning, instruction tuning, and alignment methods such as RLHF and preference optimization. Focuses on when and how to customize a base model rather than prompt it, and the data and compute tradeoffs involved.
At a high level, explain the Low-Rank Adaptation (LoRA) technique for parameter-efficient fine-tuning. Describe the mathematical intuition (the W + BA formulation), where the low-rank adapters are typically inserted in a transformer block, what the rank r and scaling factor alpha hyperparameters control, how per-task adapters are stored, and why LoRA reduces training memory compared with full fine-tuning.
Describe what a reward model is in RLHF: typical inputs (prompt plus one completion, or prompt plus candidate completions), label formats (pairwise preferences or numeric scores), and typical model architecture (a transformer encoder or decoder with a scalar output head). Explain why a reward model is a necessary intermediate step before policy optimization, and describe the common loss functions used to train it from pairwise preferences (Bradley-Terry pairwise-logistic loss, cross-entropy on softmaxed scores, and mean-squared error for scalar labels), noting basic numerical-stability and regularization concerns.
Define instruction tuning (supervised fine-tuning on instruction-response pairs) and explain how it differs from generic supervised fine-tuning and from RLHF: differences in data (instruction-response pairs vs preference pairs), objectives, iteration speed, typical failure modes, required data types and sizes, and compute profiles. Why do most alignment pipelines use instruction tuning (SFT) and an RLHF/DPO stage together rather than either alone, and in what product scenarios does instruction tuning alone give the largest user-visible improvement?
Explain Reinforcement Learning from Human Feedback (RLHF) as used to align large language models: the core components (policy model, reward model, human preference data, and the RL algorithm), the typical data flow from prompts to preference labels to policy updates, and where human raters fit into the pipeline. Outline the practical pipeline for improving an assistant's helpfulness end to end, and note common pitfalls such as reward hacking and the need to validate that the reward model actually generalizes to real human preferences.
List and compare common human feedback collection methods used for RLHF: pairwise preference judgments, Likert-scale ratings, binary accept/reject, and full ordinal ranking. Discuss pros/cons for label quality, cost, annotator cognitive load, and how easily each can be converted into a training objective.
Unlock Full Question Bank
Get access to all 17 LLM Fine-Tuning and Alignment interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.