I struggled to grind for ML/AI interviews so I went back to the basics and created a list after careful research. These are real problems from first person reports from real engineer interviews.
[!IMPORTANT]
Don't use GPT. The whole point is to struggle through these yourself. If you paste these into ChatGPT you're wasting your time. The goal is to deeply understand PyTorch, not to get an answer. I used GPT to help write some of the initial code, but I tested and solved every problem myself. That's where the learning happens.
AI Tutor (NEW)
Turn any AI assistant into your PyTorch interview coach. The TorchLeet MCP server gives your AI access to all 68 problems, progressive hints, company prep plans, and learning paths, while enforcing a no-spoilers teaching style.
# Clone the repo first
git clone https://github.com/Exorust/TorchLeet.git
cd TorchLeet
# Then connect the AI Tutor (pick your client)
# Claude Code
claude mcp add torchleet -- npx -y torchleet-mcp
# Codex
codex mcp add torchleet -- npx -y torchleet-mcp
Claude Desktop / Cursor / VS Code
Add this to your MCP config:
{
"mcpServers": {
"torchleet": {
"command": "npx",
"args": ["-y", "torchleet-mcp"]
}
}
}
Four learning guides:
Set up the AI Tutor | torchleet-mcp on npm
68 problems across three tracks:
Questions overlap between tracks. Company-tagged questions tell you exactly what Google, Anthropic, Meta, and others ask.
Quick Start
# Install PyTorch
# https://pytorch.org/get-started/locally/
# Pick a problem, fill in the TODOs, compare with the solution
jupyter notebook torch/basic/lin-regression/lin-regression.ipynb
Each problem has a question file and a _SOLN solution file. Fill in the ... and #TODO blocks, then check your work.
LLM Learning Path
Build an LLM from scratch, one question at a time. Recommended order:
1. Foundations
3. Full Model
4. Alignment & Fine-Tuning
5. Decoding & Inference
6. Systems
Basics
Core PyTorch and classical ML fundamentals.
Advanced
Company-tagged questions from real ML/AI interviews. Sorted by topic.
Modern Architectures
Alignment & Training
LLM Inference & Systems
GPU Systems & Kernels
Hard Foundations
Company Quick-Reference
"If I'm interviewing at X, which questions should I prioritize?" Numbers reference the v3-tagged questions above.
Contributing
Found a bug? Have a question from your own interview? PRs are welcome. Follow the notebook structure (question file + _SOLN file) and tag the authors.
If you found this helpful, follow me on Twitter. I post about ML interviews, PyTorch tips, and what I'm building next. Or just send me feedback, I read everything.
Contributors
Thanks to everyone who has added problems, fixes and solutions (11 so far):
Authors
Stargazers
