Legacy Concept Lab
Efficiency: Quantization, Distillation, LoRA & Sparse MoE
Quantization + LoRA are standard for deploying and fine-tuning Llama-class models on modest GPUs
#16EfficiencyEfficiency
key equation
Phase 8: Scaling, theory & multimodalConcept 16 of 100
Why It Matters for Modern Models
- Quantization + LoRA are standard for deploying and fine-tuning Llama-class models on modest GPUs
- Distillation compresses large base models into "small assistants"
- MoE/Switch-style sparsity powers very large Google-scale models (likely Gemini)
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Geometric views of low-rank updates: LoRA as adding a small, oriented "slice" in weight space
- Intuitive trade-offs in quantization: how error propagates, why some layers are more sensitive
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Key Equation
Distillation: train student to match teacher :
Quantization: map float weights to low-bit integers:
LoRA: re-parameterize weight matrix as: , where — only train , freezing .
Sparse MoE: FFN layers replaced by many experts , with router: