Distill a Large Llama Model Into a Small On-Device Assistant
Last updated: November 29, 2026
Quick Overview
Meta wants a small language model to run on Ray-Ban Meta glasses or phones for quick replies. Explain how knowledge distillation works for LLMs and the design choices you would make.
Meta
November 29, 20260
0
0 solved
Meta wants a small language model to run on Ray-Ban Meta glasses or phones for quick replies. Explain how knowledge distillation works for LLMs and the design choices you would make.
On-device AI on Meta hardware has tight memory, power, and latency limits. The interviewer looks for a clear distillation objective, the right data strategy, and awareness of quantization and evaluation on device.
What the Interviewer Expects
- Explain soft-label distillation with temperature and KL divergence
- Compare logit distillation with sequence-level distillation on teacher outputs
- Discuss student architecture choices for a memory budget
- Combine distillation with quantization
- Evaluate on the target tasks and on-device latency
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- Why does a higher distillation temperature help?
- What if the teacher and student use different tokenizers?
- How would you decide which capabilities to drop from the student?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Target: a model of roughly 1B parameters or less that runs on a phone or glasses SoC within a few hundred MB of memory, handling short tasks such as reply suggestions, quick questions, and summarizing...
Approach
Train the student to match the teacher's behaviour on the target task distribution, then compress it further for the device....