15-year-old's attention kernel survives 32k tokens where standard PyTorch OOMs, 11x faster

vankownlaw · reddit · 2026-11-04

A 15-year-old developer built a brain-inspired attention kernel that keeps a few tokens as "sinks" and uses a rolling window with entropy decay, never materializing the NxN matrix. On a Tesla T4 it ran 6x faster than nn.MultiheadAttention at 10k tokens (0.0148s vs 0.0893s) and kept running smoothly at 32k tokens where the standard implementation hit CUDA OOM. An interactive web UI lets you benchmark 1k-50k tokens live; the author offers paid setup consultations and seeks real-world feedback.

Related event: 15-year-old builds attention kernel: no OOM at 32k, 11x faster(2 posts)→

Original post →

More from Infra

Infra channel →