AIInterviewTraining logoAIInterview/Training
Coding & DSA / 74

Implement an exponential moving average (EMA) of model weights, and explain why it helps.

Many state-of-the-art training runs hold a shadow copy of the weights that averages the trajectory, then serve that rather than the final step. It's a few lines and a genuine accuracy gain. Here it is.

Updated Sep 2026 · Grounded in real GenAI, LLM, and AI/ML engineering interview loops and written to a senior-engineer editorial bar.

Many state-of-the-art training runs hold a shadow copy of the weights that averages the trajectory, then serve that rather than the final step. It's a few lines and a genuine accuracy gain. Here it is.

Unlock the other 847 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet — be the first to share your approach.