InterviewStack.io LogoInterviewStack.io

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.

HardTechnical
103 practiced

Design an experiment to evaluate how aggressive quantization (4-bit or lower, combined with LoRA/adapters) of a fine-tuned or instruction-tuned model impacts alignment objectives such as helpfulness and safety when serving on CPU or resource-constrained hardware. Cover the experimental groups, metrics, sampling strategy, statistical analysis, calibration/quantization-aware fine-tuning steps, and mitigation techniques if quantization measurably degrades aligned behavior.

EasyTechnical
66 practiced

Write a Python function to compute Kendall's Tau for a set of predicted preference scores versus ground-truth pairwise labels. Input: list of tuples (score_a, score_b, true_preference) where true_preference is 1 if a>b else 0. Output: numeric Kendall's Tau. Explain how you handle ties in scores or labels.

HardTechnical
51 practiced

Discuss approaches for multi-objective reward shaping where you must trade off helpfulness and non-harmfulness in RL training. What formulations would you consider, and what practical training schedule or curriculum would you use to reach an acceptable trade-off?

HardTechnical
50 practiced

Discuss in depth the trade-offs between adapter modules, LoRA, prefix-tuning, and prompt-tuning: parameter efficiency, training speed, inference memory and compute, and task expressivity. Given a 10B-parameter transformer with limited GPU memory, how would you choose between them in practice, and where does one approach substantially outperform another?

MediumTechnical
65 practiced

Design a controlled experiment to compare full fine-tuning, LoRA, and Adapter-based fine-tuning on a 5-class text classification problem with 2,000 labeled examples. Describe dataset splits, metrics (including resource metrics), hyperparameter search strategy, compute/resource tracking, and how you would report statistical significance between methods.

Unlock Full Question Bank

Get access to all LLM Fine-Tuning and Alignment interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.