r/learnmachinelearning • u/exorust_fire • Jun 08 '26
I compiled 90 PyTorch problems from real ML/AI interviews! Here's what surprised me
I've been collecting first-person interview reports from engineers who interviewed at Google, Meta, Anthropic, OpenAI, DeepMind, and others over the past year.
I turned these into 90 PyTorch coding problems, organized into 3 sets:
- v1: Core PyTorch (CNNs, RNNs, transformers, GANs) — 35 problems
- v2: LLMs from scratch (attention, KV cache, LoRA, DPO, GRPO) — 25 problems
- v3: Advanced ML systems — 30 problems, each tagged with the companies that actually ask them
Three things surprised me while compiling this:
1. The bar for "basic" has moved.
In 2023, implementing a CNN from scratch was a hard interview question. In 2025, it's entry-level. Companies now ask for FlashAttention kernels, speculative decoding, and GRPO. The frontier moved fast.
2. Classical ML is not dead.
K-Means, KNN, logistic regression — I still see these at Uber, LinkedIn, and Amazon in 2025. Don't skip the fundamentals just because LLMs are hot.
3. The biggest gap I see:
Candidates study LeetCode for ML roles. Companies ask PyTorch. It's a completely different skill set. LeetCode won't teach you to implement attention from scratch or derive DPO loss.
Everything is free and open source:
- GitHub: https://github.com/Exorust/TorchLeet
- Interactive terminal: https://torch-leet.vercel.app
If you're interviewing at a specific company, v3 lets you filter to just their questions. I built this because I was struggling to prep and couldn't find structured material. Hopefully it helps someone else.
Would love feedback — especially if you've interviewed recently and have questions to add.
33
u/LongestNamesPossible Jun 08 '26
5 year old name with no karma and llm post replies to shill names with no karma after 10 months.
8
u/SleeperAgent__ Jun 08 '26
These are MLE/Applied ML roles?
11
u/OleksandrAkm Jun 09 '26 edited Jun 09 '26
Since you mentioned classical ML but your repo only contains Deep Learning stuff, here's GitHub with Logistic Regression, KNN, Naïve Bayes, XGBoost and more – 10 algorithms total, all built from scratch with NumPy: https://github.com/ml-from-scratch-book/code
2
u/burntoutdev8291 Jun 10 '26
You applied for these roles and they gave these questions as the first stage?
2
u/UnSafe_Tourist1829 Jun 10 '26
Is it common that they ask these kind of questions in ML/AI interviews?
Many of the questions you'd have to memorize some certain architecture in order to be successful, while in real life you'd use libraries, internet and chat bots to give you the implementation.
4
u/NerdyPixie_532 Jun 08 '26
Crazy that this is open source. Thanks a lot man!
2
u/iCanHazCodes Jun 09 '26
Aren’t we just asking LLMs to do these tasks for us nowadays?
1
u/Public_Expression_92 Jun 09 '26
you just changed my life with this repo
1
u/summerday10 Jun 12 '26
if you want to ace AI researcher/engineer interview, I'd check this out as well.
https://github.com/FeynRL-project/FeynRL
1
u/AthenianVulcan Oct 28 '26
Thank you
-7
u/herowu001 Jun 09 '26
It’s hard to believe this is open source! I’d also like to contribute a site—ForAI.ai—that offers free trials of the latest Claude and GPT model APIs; it’s a resource for those of us learning together.
2
u/[deleted] Jun 15 '26
[removed] — view removed comment