Pinned Tweet
(1/4) @flappyairplanes raised $1B to develop megakernels for unusual, data-efficient learning.
Since I don't have $1B, I built Latch: a compiler that generates training megakernels from PyTorch. It's open source!
(1/4) Is learning about the journey or the destination?
I upgraded my multiplier to work at any length, with no mistakes on 3M problems up to 500 × 500 digits. But gradient descent breaks it within 25 steps, even though there's a harmless way to lower the loss.
Why?
(1/4) 4-digit multiplication is hard for transformers to learn. @yuntiandeng @YejinChoinka et al cracked it by phasing out CoT. @Elenal3ai @PresItamar et al hit ~100% using a running-sum loss.
An LLM just wrote it in 355 weights (40,000x fewer than SOTA) without training.
(4/4) Multiplication is page one of the algorithms textbook. On algorithms, reads and writes of weights can be checked, and checkable answers are how models got good at math and code.
That's a whole textbook of verifiable rewards...
Post: deepaksingh98.github.io/proj…
1
74
Thanks @SoumilBhandari @_chenglou @DamienTeney @DimitrisPapail for the questions/comments on the last one!
Thanks also to @bradenjhancock and the @LaudeInstitute for compute support!
2
112
(1/4) 4-digit multiplication is hard for transformers to learn. @yuntiandeng @YejinChoinka et al cracked it by phasing out CoT. @Elenal3ai @PresItamar et al hit ~100% using a running-sum loss.
An LLM just wrote it in 355 weights (40,000x fewer than SOTA) without training.
(3/4) I then reduced it to one looped layer: one block of 364 weights, run exactly 42 times.
Since not every pair needs 42 passes, I made the loop adaptive. That got it to 355 weights, and it usually stops after about 15 passes.
(4/4) Weight-space programming is cool because it lets you precisely control how algorithms are represented in neural networks. It relates to some very cool work I did in a previous life, on which I’ll share more soon!
Post: deepaksingh98.github.io/proj…
Code: github.com/DeepakSingh98/mul…
(1/5) First a CPU, then a GPU, then a filesystem. Next: a research lab.
Meet qwenLab: Qwen3.5-9B with six small transformers living inside it. Each is a 420k-parameter model learning modular addition, the classic grokking task. The model trains them side by side in its own forward passes with Qwen deciding how.
First a CPU, then a GPU. A computer isn’t complete without storage.
Meet qwenFS: Qwen3.5-2B with a filesystem compiled directly into its weights. Nothing runs outside the model. It adds 8 layers in front of Qwen’s own 24, using attention to hold the files and Gated DeltaNet state to hold the tables.
Every save and read runs in the model’s own forward pass. A write stores its text in the copy layer’s attention log, keyed by file, version and offset. A read uses those same keys, so attention copies the text back exactly token by token.
(4/5) In one session, Qwen took a transformer that had only memorized (6% val), forked it into three copies with learning rates and weight decays of its choosing plus an unchanged control, read the scores, and tried again. Its pick reached 49% held-out accuracy vs 16% for the control.
1
3
292
(5/5) Obviously this is just a fun demo (it's very slow) but the training is real and matches PyTorch exactly.
You can check out the code here: github.com/DeepakSingh98/qwe…
(1/2) Nestor is compute-efficient but brutal on GPUs: tokens route to attention "columns" that change every batch, no residual stream, per-column experts, etc.
These unusual workloads are perfect for Latch, my compiler for training megakernels.
Latch auto-generated a megakernel that trains Nestor 2.1x faster to the same loss.
(2/2) I also tuned the PyTorch version, which made it 1.7x faster. Latch is still 1.24x faster than that.
Super cool work @TianzheC @druv_pai!
More details for the curious: deepaksingh98.github.io/latc…
1
127
(4/4) Latch is a research preview for H100s and currently generates megakernels for MoE, state-space, diffusion, and energy-based models.
Try it out: deepaksingh98.github.io/latc…
Many thanks to @modal for generously supporting this project with GPU credits!
14
1,001











