Back to TorchLeet
Newtorchleet-mcp

Claude teaches you PyTorch

Turn any AI assistant into your PyTorch interview coach. 75 problems, progressive hints, company prep, and learning paths. It won't spoil the answers either.

How It Works

1
Clone the repo
Get the notebooks so the tutor can read actual problems.
2
Connect the tutor
One command. npx handles the rest.
3
Start learning
Pick a guide and ask naturally. It finds problems, gives hints, and checks your work.

Clone the Repo

You'll work through problems as Jupyter notebooks. Clone first so the AI tutor can read the actual problem files.

Terminal
git clone https://github.com/Exorust/TorchLeet.git
cd TorchLeet

Connect the AI Tutor

Run this from inside the TorchLeet folder. npx handles the rest.

  1. Run this single command:
Terminal
claude mcp add torchleet -- npx -y torchleet-mcp

Learning Guides

Tutor Mode
Guides you through questions
torchleet-tutor
Interview Prep
Grills you through timed technical interviews
torchleet-interview-prep
Code Review
Reviews the code you've written
torchleet-review
Concept Deep-Dive
Starts off easy and builds it up for you
torchleet-explain

Example Workflows

Guided Study Sessiontorchleet-tutor

I want to learn how attention works in transformers

TorchLeet

Great choice! Let's start with the fundamentals. Before we dive into the code, tell me: what do you think "attention" means intuitively? What problem does it solve that simpler approaches can't?

It lets the model focus on relevant parts of the input?

TorchLeet

Exactly! Now let's make that concrete. I've pulled up the Scaled Dot-Product Attention problem (#V3-8). Here's your Level 1 hint, just the problem statement and requirements. Try to sketch out the function signature before I show you more.

Interview Prep for Anthropictorchleet-interview-prep

I'm interviewing at Anthropic next week, help me prepare

TorchLeet

Let's simulate a real interview. I've found 8 problems tagged with Anthropic, spanning DPO Loss, GRPO, KV Cache, and more. We'll start with a 20-minute timed problem. Ready?

Yes, let's go!

TorchLeet

Your first problem: Implement DPO Loss from scratch. You need to compute the Direct Preference Optimization loss given policy and reference model log-probabilities. Timer starts now. What's your approach?

Code Reviewtorchleet-review

Can you review my FlashAttention implementation?

TorchLeet

I'll review this as a senior ML engineer. Three things I notice right away:

1. **Numerical stability**: your softmax isn't using the log-sum-exp trick

2. **Memory**: you're materializing the full N×N attention matrix, which defeats the purpose of FlashAttention

3. **Tiling**: the block size should be tuned to SRAM capacity

Let's fix #2 first since it's the core idea...

GitHub
Star & contribute
npm
Install torchleet-mcp
Discord
Join the community