TorchLeet: 68 PyTorch Interview Problems With an Auto-Grader and an MCP Tutor
LeetCode for PyTorch — 65 ML/AI interview problems from real interviews at Google, Meta, Anthropic. Jupyter notebooks, an auto-grader, and an MCP AI tutor.
At a glance
- What is it?
- TorchLeet is a notebook-based problem set drawn from first-person ML/AI interview reports, shipped with a Python grader and an MCP server that turns any AI assistant into a hint-giving coach. The design is deliberately anti-ChatGPT, and that is both its strength and its main constraint.
- Who is it for?
- TorchLeet suits engineers who already write PyTorch and want to rehearse the from-scratch implementations that come up in ML/AI interviews: attention, KV cache, LoRA, DPO, PPO, decoding. It is the wrong tool if you are new to tensors, if you want a graded curriculum with deadlines, or if you plan to paste problems into a chatbot, which the README explicitly tells you not to do.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 15 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What TorchLeet is solving, and who it is actually for
The README opens with a personal complaint: the author "struggled to grind for ML/AI interviews" and built the list after what it calls careful research, using first-person reports from real engineer interviews. That framing matters. TorchLeet is not a general deep learning course. It is a rehearsal set for a specific interview format where you are handed a whiteboard or a notebook and asked to implement multi-head attention, a KV cache, or a DPO loss without libraries doing the work for you.
The audience is narrow and the README is honest about it. If you cannot already write a training loop, the 24 Basics problems are where you start, but the 23-question LLM Learning Path and the 48 Advanced problems assume fluency. The overlap note in the README is important: questions appear in more than one track, so the three track counts do not add up to 68 distinct problems. Read the track table as a routing aid, not a partition.
The company tags are the other half of the pitch. LoRA is tagged Meta, Google, Anthropic, OpenAI. DPO and PPO for RLHF are tagged Anthropic, OpenAI, DeepMind, Meta. GRPO is tagged DeepMind, Anthropic, OpenAI. Continuous batching is tagged Perplexity, Together AI, Meta. Those tags are claims about where the questions were reported, and the repository does not publish the underlying interview reports, so treat them as a study signal rather than a citation.
How the notebooks, solutions and grader fit together
Each problem is a Jupyter notebook with a paired solution file. The README describes the workflow as filling in `...` and `#TODO` blocks and then comparing against the solution, and the file naming shows that convention: a question notebook such as `rope-q8-Question.ipynb` sits next to `rope-q8.ipynb`, and elsewhere the pair is `kv-cache.ipynb` and `kv-cache_SOLN.ipynb`. The suffix is not consistent across directories, which is a small annoyance when you script anything over the tree.
The repository layout is where the rest of the machinery lives. `problems.json` and `PROBLEMS.md` at the top level hold the problem index. `python/` is a Python package, and the Dockerfile installs it with `pip install ./python`, which is the auto-grader the project description refers to. `mcp-server/` holds the Model Context Protocol server published to npm as `torchleet-mcp`. `scripts/` and `website/` cover tooling and the site at torch-leet.vercel.app. The `llm/`, `torch/` and `v3/` directories hold the notebooks themselves, and the README's links point into all three, so a single learning path can span directories.
One design consequence is worth naming. Because the grader is a local Python package rather than a hosted judge, checking your work is a local operation with no submission queue and no hidden test suite you cannot inspect. That is good for trust and bad for anyone who wanted the LeetCode experience of a pass/fail verdict from a remote runner.
Installing TorchLeet and opening your first notebook
The README's Quick Start assumes you already have PyTorch and points at the official install page rather than pinning a version. The first command clones the repository and moves into it, and the second opens a single notebook from the Basics track.
git clone https://github.com/Exorust/TorchLeet.git
cd TorchLeet
jupyter notebook torch/basic/lin-regression/lin-regression.ipynbYou should see a linear regression notebook with the problem statement at the top and `...` or `#TODO` markers in the cells below. Fill those in, run the cells, then open the matching solution file in the same directory to compare.
If you would rather not install Python, PyTorch or Jupyter locally, the Dockerfile describes a zero-install image and publishes it to the GitHub Container Registry. It exposes port 8888 and starts JupyterLab with token and password authentication disabled, which is fine on a laptop and not fine on a shared host.
docker run --rm -p 8888:8888 ghcr.io/exorust/torchleetThe image builds on `python:3.12-slim`, installs `torch` and `torchvision` from the CPU wheel index, then adds `jupyterlab`, `matplotlib` and `numpy`. The Dockerfile comments explain why both torch packages come from the same index: mixing indexes can produce a torchvision compiled against a different torch, which fails at import with an obscure symbol error.
The AI tutor is a separate install. The README shows the Claude Code and Codex forms, and a JSON block for Claude Desktop, Cursor and VS Code.
claude mcp add torchleet -- npx -y torchleet-mcpAfter that, the README lists four guides the server exposes: `torchleet-tutor` for progressive hints, `torchleet-interview-prep` for timed mock interviews by company, `torchleet-review` for a senior-engineer code review, and `torchleet-explain` for intuition-to-math walkthroughs. The server is documented as enforcing a no-spoilers teaching style, which is the mechanism behind the README's warning not to use GPT as a solver.
The anti-ChatGPT stance is a real feature and a real limitation
The README carries an explicit warning: do not use GPT, because pasting the problems into a chatbot wastes your time. The author also states that GPT helped write some of the initial code while every problem was tested and solved by hand. That is a defensible position, and the MCP tutor is the constructive version of it, since hints arrive progressively instead of as a finished answer.
It is also the biggest limitation for a certain kind of user. If your goal is to pass a screening round next week rather than to build durable understanding, the deliberate friction is a cost with no short-term payoff. The repository does not offer a speedrun mode, a solutions-only index, or a difficulty rating per problem, so triage is manual.
Two smaller gaps are visible from the repository itself. There are no releases, so there is no versioned artifact to pin and no changelog to read before an upgrade. And the README does not document rollback or a versioning policy for the notebooks, which means a problem you solved last month may have changed shape under you with nothing in the repository announcing it.
Where TorchLeet sits next to LeetCode-style practice and from-scratch repos
The obvious comparison is LeetCode itself, and the difference is the judge. LeetCode runs your function against hidden test cases in a sandbox and returns a verdict. TorchLeet gives you a notebook, a local grader and a solution file. You get inspectability and no rate limits, and you lose the external verdict that tells you your implementation is wrong in a way you did not anticipate.
A closer comparison is the family of from-scratch repositories that implement one model end to end, such as a single nanoGPT-style training script. Those give you a working artifact and a reading experience; there is no exercise layer, no per-problem solution pair, and no grader. TorchLeet inverts that: you get 68 separable exercises and no complete reference model you can run as a whole, unless you assemble one from the SmolLM problem and the surrounding pieces yourself.
Against a paid interview-prep course, the trade is different again. TorchLeet is MIT licensed and self-paced, with no cohort, no schedule and no instructor feedback beyond the `torchleet-review` guide. That last point is the honest boundary: the feedback loop is an AI reviewer following a documented rubric, not a human who has interviewed at the company on your list.
Licence, maintenance and what an upgrade costs you
TorchLeet is MIT licensed, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are retained. The repository also ships a CITATION.cff, so academic citation is expected even though the licence does not require it. Nothing here is legal advice; if you plan to fold these notebooks into paid internal training material, read the LICENSE file at the repository root rather than this paragraph.
The last push to the default branch was on 2026-09-08, and the repository is not archived. That is the only maintenance signal available. There are no tagged releases, so "upgrading" means pulling the default branch, and the cost of that is proportional to how much you have edited the notebooks. If you filled in TODOs in place, a pull can conflict with your work. The cleaner pattern is to keep your own solutions in a separate directory and treat the repository as read-only input, which the paired-question-file layout supports.
The MCP server is a second upgrade surface with a different cadence. It is distributed through npm, and the README's install commands use `npx -y torchleet-mcp`, which resolves the latest published version on each run. If you need reproducibility there, pin the package version in your MCP config instead of relying on `-y`.
Editorial conclusion
TorchLeet suits engineers who already write PyTorch and want to rehearse the from-scratch implementations that come up in ML/AI interviews: attention, KV cache, LoRA, DPO, PPO, decoding. It is the wrong tool if you are new to tensors, if you want a graded curriculum with deadlines, or if you plan to paste problems into a chatbot, which the README explicitly tells you not to do. Before committing, clone the repo, open one notebook from the track you care about, and check that its _SOLN file exists and that the grader in python/ runs against it on your machine.
Frequently asked questions
What exactly is PyTorch used for in TorchLeet?
TorchLeet uses PyTorch as the implementation target for all 68 problems: you fill in `...` and `#TODO` blocks in Jupyter notebooks and compare against a paired solution file. The Dockerfile installs torch and torchvision from the CPU wheel index so the notebooks run without a GPU.
Is PyTorch still relevant in 2026 for interview preparation?
The repository does not discuss PyTorch's standing against other frameworks. What it does show is that its company-tagged problems, including LoRA, DPO, PPO for RLHF and GRPO, are written as PyTorch implementations, so the interview preparation it offers is PyTorch-specific.
Is PyTorch better than TensorFlow for these TorchLeet problems?
The README makes no comparison between PyTorch and TensorFlow. TorchLeet is built entirely around PyTorch, and the Dockerfile installs torch and torchvision from the PyTorch CPU wheel index, so there is no TensorFlow path in the repository.
Is ChatGPT using PyTorch?
The repository does not say which framework any model provider uses. The only mention of ChatGPT in the README is the warning not to paste TorchLeet problems into it, and the `torchleet-mcp` server that offers progressive hints instead of answers.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/exorust-torchleet)