ml coding Interview Questions
15 questions available. Practice with AI-powered feedback.
Other topics
Anthropic ML Coding: Prompt-based Binary Classifier
Build a prompt-based binary classifier from per-token log-probs, convert scores to P_pos, compute accuracy & cross-entropy without libraries. Read steps & tips.
ByteDance ML: Binary Logistic Regression (NumPy)
Implement a binary logistic regression classifier from scratch with NumPy. Learn fit, predict_proba, predict, BCE loss and gradient descent. Practice coding now.
Debug and Extend GPT-style Transformer — OpenAI ML Engineer
Fix 4 intentional bugs in a PyTorch GPT-style transformer, add KV-cache and a token classifier, and reproduce reference training outputs. Learn verification steps.
From-Scratch PyTorch Transformer — Apple Interview
Implement a runnable, from-scratch PyTorch Transformer (encoder–decoder) with Multi-Head Attention, masks, and residuals. Read steps, tips, and follow-ups.
Google ML Coding: Hand-code Multi-Head Attention in NumPy
Implement multi-head attention in NumPy: scaled dot-product for batched Q,K,V. Do per-head projections, reshape, apply mask, and return attention weights.
Implement k-Fold Cross-Validation From Scratch — Uber
Implement k-fold, stratified, and time-series CV from scratch for ML evaluation. Includes split contracts, reproducibility, and aggregate metric. Read on to prepare.
LinkedIn ML: Large-Scale Streaming Mean & Variance
Compute population mean and variance in one pass over massive float streams. Includes mergeable, numerically stable summaries for distributed ML systems — try it.
Netflix ML Coding: Compute TF-IDF for Corpus Implementation
Compute TF-IDF for a corpus in Python: implement TF, IDF and per-token TF-IDF scores. See interview flow, skills tested, and practice follow-ups to prepare.
NVIDIA ML Coding: Decaying Attention Implementation
Implement decaying attention (softmax(QK^T + B)V with B_{ij}=|i-j|). Includes batched/unbatched NumPy examples, dtype validation, and softmax stability tips.
OpenAI ML Coding: Noisy Human-Labeled Text Classifier
Analyze noisy human annotations and train embedding-based classifiers for identity_attack labels. Filter reliable annotators, retrain models, and propose robustness steps. Start preparing.
Scaled Self-Attention Implementation — Meta
Implement scaled self-attention for Transformers: compute attention outputs and per-query weights from Q, K, V with masking and numerical-stability. Try coding
Snapchat ML Coding: K-Means + MapReduce Implementation
Prepare for Snapchat ML coding: implement deterministic K-means (centroids & assignments) and adapt it to MapReduce with mapper/reducer scripts. Learn iteration & stop rules.
Get More Real ml coding Questions
Practice ml coding interview questions with AI-powered hints, analysis, and feedback.
Start Free Practice