TensorTonicTensorTonic
Problems
Study PlansLabsProjectsInterviewPricingFeedback

Implement ML Papers From Scratch

Each track breaks one landmark paper into small steps. You implement every step in Python in the browser, and tests check your code before you move on. If you are new, start with the Transformer, or read which ML papers to implement from scratch to choose a track.

Transformers and LLMs

Convolutional networks

Sequence models and embeddings

Generative models

GPT-2

GPT-2 badge
1

BPE Training

Plus

Byte Pair Encoding training algorithm

Hard
2

BPE Encode/Decode

Plus

BPE encoding and decoding

Medium
3

Token + Position Embedding

Plus

Combined token and learned positional embedding

Easy
4

Scaled Dot-Product Attention

Plus

Core attention computation

Medium
5

Causal Masked Attention

Plus

Attention with causal mask for autoregressive decoding

Medium
6

Multi-Head Attention

Plus

Multi-head causal self-attention

Hard
7

GELU Activation

Plus

Gaussian Error Linear Unit activation function

Easy
8

Layer Normalization

Plus

Pre-norm layer normalization

Easy
9

Feed-Forward Network

Plus

Position-wise FFN with GELU

Easy
10

Decoder Block

Plus

Full pre-norm transformer decoder block

Hard
11

Residual Weight Scaling

Plus

Initialization scaling for deep residual networks

Medium
12

Full Forward Pass

Plus

Complete GPT-2 forward pass

Hard
13

Greedy Decoding

Plus

Autoregressive greedy generation

Medium
14

Top-k Sampling

Plus

Temperature scaling and top-k sampling

Medium
Loading architecture visualization...