TorchCode: PyTorch LeetCode alternative

TorchCode open-sourced a LeetCode-style problem set for PyTorch with 39 ML interview problems (softmax, ReLU, Transformers) plus auto-grading and no GPU needed—built to mirror interviews at Meta, DeepMind, and OpenAI. It's a focused way to practice ML primitives that show up in infra and model-serving interviews. (x.com)

duoan/TorchCode is hosted on GitHub and the repository lists a curated set of 40 problems (not 39) and shows ~2.7k stars on the project page ). (github.com) The problems range from fundamentals like ReLU, softmax, linear layers, and LayerNorm to model- and infra-level tasks such as GPT‑2 block, KV‑cache, Flash Attention, speculative decoding, LoRA, MoE, int8 quantization, Adam, PPO, DPO and GRPO losses (solutions directory lists 01–40 notebooks). ). (github.com) The built-in judge performs numerical correctness checks, gradient/autograd verification and timing-based performance checks as part of automated grading (engine and judge code implement correctness, gradient checks, and timing assertions). ). (github.com) The judge is published separately on PyPI as torch-judge (latest release 0.1.1 on Mar 9, 2026), and the project supports running in Colab via pip install torch-judge or by pulling a pre-built Docker image ghcr.io/duoan/torchcode:latest.; github.com/duoan/TorchCode/blob/master/README.md). (pypi.org) The repository owner, Duo An (GitHub handle duoan / Victor An), lists his profile as Senior Machine Learning Engineer at Amazon AGI and maintains active commits (recent README and workflow commits within the last few weeks). ). (github.com) All tasks ship as Jupyter notebook templates with corresponding solution notebooks in the repo and the project is also available as a Hugging Face Space for an online JupyterLab experience.; ). (colab.research.google.com)

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.