##
To view keyboard shortcuts, press question mark
View keyboard shortcuts

## Post

# Conversation

Aadi Kulshrestha
@MankyDankyBanky
Click to Follow MankyDankyBanky
I trained a 12M parameter LLM on my own ML framework using a Rust backend and CUDA kernels for flash attention, AdamW, and more. Wrote the full transformer architecture, and BPE tokenizer from scratch. The framework features: - Custom CUDA kernels (Flash Attention, fused LayerNorm, fused GELU) for 3x increased throughput - Automatic WebGPU fallback for non-NVIDIA devices - TypeScript API with Rust compute backend - One npm install to get started, prebuilt binaries for every platform Try out the model for yourself: https://mni-ml.github.io/demos/transformer/… Built with
@_reesechong
. Check out the repos and blog if you want to learn more. Shoutout to
@modal
for the compute credits allowing me to train on 2 A100 GPUs without going broke cc
@sundeep
@GavinSherry
2:03
12:00 PM · Apr 17, 2026
·
686.5K
Views
View quotes
Post your reply
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Everything is open source, and we wrote a thorough blog breaking down everything we did so you guys can learn. Repo: https://github.com/mni-ml/framework… Blog:
mni-ml
From mni-ml.github.io
26K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Test the LLM and view the probability distribution of next tokens. All running in the browser using our own framework. https://mni-ml.github.io/demos/transformer…
21K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
As per
@ClementDelangue
's suggestion, I uploaded the model to HuggingFace. Feel free to check it out and run the model yourself:
mni-ml/transformer · Hugging Face
From huggingface.co
15K
Hooded Horse
@HoodedHorseInc
Ad
Old World, a 4x strategy game on Steam
Slide 1 of 3 - Carousel

- Learn More
- Learn More

3M
surya
@suryasure05
·
Apr 17
very cool
1.8K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Thank you
1.6K
Lance Yan
@lanceyyan
·
Apr 18
fire
223
dnu
@DnuLkjkjh
·
Apr 18
respect. writing your own framework is one thing, getting a full train run to converge is the part that usually gets ugly. what broke first for you, kernels or optimizer math?
3K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 18
We had a lot of bugs with our CUDA kernels that had to be addressed before the training started to go well
2.7K
Ken Wu
@kenwuuuu
·
Apr 17
how did i get into the same school as this beast
2.9K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Lmaooo
2.7K
Kenny Guo
@kennykgguo
·
Apr 17
first principles
2.2K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Yessir
2K
Gavin
@GavinSherry
·
Apr 17
Love it. Dm me?
5.9K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
For sure!
5.4K
Taelin
@VictorTaelin
·
Apr 17
cost?
8.9K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
I spent ~$100 CAD of my own money, but
@modal
gave me ~$400 free credits at a hackathon a while back. The total was $500 of cloud compute
5.6K
Ani
@AnirudhDabas
·
Apr 18
aadi might be him
1K
Aadi Kulshrestha
@MankyDankyBanky
·
21h
lol ty ani
950
im_justmatthew
@1jmdev
·
Apr 18
Please update the demo page so it caches the model on user device it is really cool but please cache it on user device
1.5K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 18
Good point, will try to get this out soon!
1.3K
Xander Chin
@XanderChin
·
Apr 17
fire
2K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Appreciate it, TinyTPU was a big inspo
1.8K
ayush
@ayushrgarg
·
Apr 17
my goats
@_reesechong
and
@MankyDankyBanky
this is insane
2.5K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Ty bro
2.3K
Bryce Adelstein Lelbach
@blelbach
·
Apr 17
DM me if you wanna chat about Rust for GPU programming!
4.4K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Will definitely reach out, even before I got into AI I did a lot of GPU programming work related to game development and rendering
3.6K
Vyshnav
@vyshnavdoestuff
·
Apr 18
Can I ask how long you've been writing Rust?
567
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 18
Not very long, I did some basic stuff with Rust before but this is my first large scale project in Rust. Still have a lot to learn!
496
AI fan
@aias_0
·
Apr 18
Fused LayerNorm and GELU kernels are a great optimization. Did you use Triton or raw CUDA?
2.3K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 18
Raw CUDA
2.1K
evan
@evanliin
·
Apr 17
nice work!!
1.5K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Thanks so much Evan!
1.4K
Yechan Do
@yechan_ai
·
Apr 17
This is so impressive. Can I use your work at my lecture for education purpose ?
1.9K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Yes of course, we’re honoured
1.8K
Astryl
@AstrylSEO
·
23h
thanks for the amazing work! Gave me some things to work on haha - started making my first auto grad
627
Aadi Kulshrestha
@MankyDankyBanky
·
21h
W
555
Lemon
@heylemon_ai
Ad
Download Lemon - your personal AI voice assistant for Mac.
Lemon
From heylemon.ai
448K
Xray
@xray397
·
Apr 18
This is p awesome. What resources did you guys use to learn all this ?
476
Aadi Kulshrestha
@MankyDankyBanky
·
21h
Minitorch was a good guide for the framework itself. Ofc we added a lot more functionality and used TS and Rust instead of Python
407
anirudh bv
@anirudhbv_ce
·
Apr 17
3K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
nah you inspired me fr
2.8K
Moulik
@moulikb_
·
Apr 17
holy cracked
1.5K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
thanks moulik!
1.4K
clem
@ClementDelangue
·
Apr 17
you should share the model on http://hf.co!
Hugging Face – The AI community building the future.
From huggingface.co
5.4K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Will most definitely do
4.4K
Sanjoy Das
@_sanjoydas
·
Apr 17
Nice! Would love to get your take on cuTile Rust: https://github.com/NVlabs/cutile-rs….
GitHub - NVlabs/cutile-rs: cuTile Rust provides a safe, tile-based kernel programming DSL for the...
From github.com
3.1K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Looks interesting, will play around with it a bit and share my thoughts
2.5K
adi
@adiprasadd
·
Apr 17
very cool!
1.3K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Thanks adi
1.3K
Jacob Fu
@fujacobb
·
23h
aadi remember me when you create AGI in 5 years pls
163
Aadi Kulshrestha
@MankyDankyBanky
·
21h
Lmaoo appreciate it Jacob
152
stan p
@stanleypangg
·
Apr 17
waterloo strikes again
4.8K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
have to live up to the name
4.4K
adarsh
@axrshz
·
Apr 17
> checks bio > waterloo cs every single time great work!
1.3K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Lmaooo yessir
1.2K
0xidative
@0xiCapital
·
Apr 17
cracked
960
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
W pfp
922
Kaibo Huang
@kaibo_huang
·
Apr 17
good stuff aadi
1.5K
Aadi Kulshrestha
@MankyDankyBanky
·
Apr 17
Thanks Kaibo looking forward to Bear hacks
1.4K
Richie
@richie1lmao
·
8h
Aadi, you are incredibly talented. Genuinely keep it up- can’t wait to see what you will make!
27
LenaWithAI
@LenaWithAI
·
Apr 18
rust + cuda for the win but i bet that webgpu fallback is where you'll actually spend most of your debugging time also impressive that you managed to squeeze a full transformer from scratch without relying on existing libraries
246
OneManSaas
@OneManSaas
·
Apr 18
Building from scratch while juggling everything else sounds brutal. What made you choose Rust over something faster to prototype with? The CUDA kernel work must have been a nightmare to debug.
165
AR
@ashishraval
·
Apr 17
This is what early computer engineers who invented things and changed the faculty forever did back in 90’s. They did surgery down to 0&1 and no AI could easily ever outrun optimiser of AI. This gen should be learning Algebra/AI like this.
213
Nikhil Sonti
@nv_sonti
·
Apr 17
training a transformer from scratch used to be frontier lab work now random devs ship full implementations with custom CUDA kernels... Rust backends... BPE tokenizers built from zero as side projects what took entire teams 2 years ago is now weekend hobby territory the
285
Olamide Balogun
@nenja_mj
·
21h
I feel like asking how you learnt and built, but I fear that I already know, and have simply failed to execute over and over.
58
sanjay prasad hs
@sanjuhs123
·
16h
I used to be under the assumption that everything was going to happen on the GPU itself, but after seeing this video, I believe that there are a few actions where the CPU is also needed to transfer data. You all made a library which exclusively uses the GPU, which I think is
41
Dev Shorya
@shoryaDs7
·
Apr 18
thats actually insane. most people talk about it, you actually built it. the rust + cuda combo is hard mode too
194
benkigera
@benkigera
·
Apr 17
Reminds me of what LLMs are doing under the hood.
182
ANURAG
@theaanuragg
·
10h
Custom CUDA kernels… it took me a week just to wrap my head around basic CUDA, and you did all this in a week insane work
20
Koustava Goswami
@koustavagoswami
·
Apr 17
Wonderful I miss these days of scratch coding
240
Alex Benjamin
@alexbenjamin34
·
Apr 18
Very impressive, will read more later, but any tips on how one can get as cracked as you?
119
Team Reagent
@Reagent_Systems
·
Apr 17
you wrote the tokenizer too? Damn nice work :D
180
Gabriel Moncha
@gabimoncha
·
Apr 17
checked bio to confirm my suspicion yep it's someone from waterloo
266
FTMO.com
@FTMO_com
Ad
Proven by years, 2‑Step FTMO Challenge tests traders since 2015. Choose yours and progress towards your FTMO Account!
Pick Your FTMO Challenge
From ftmo.com
494K
Ricky Tang
@_rickytang
·
Apr 17
this is crazy bro
427
Saurabh Kumar
@drummatick
·
Apr 18
What are they feeding Waterloo undergrads
294
Entryism Enjoyer
@SecPerkinsStan
·
Apr 17
why do you need cuda if it fits in like l3 cache?
176
Furheir Purrdolf Mewtler
@PurdolfMewtlar1
·
Apr 18
No surprises this guy is from Waterloo. Waterloo guys are cracked as hell
117
Vibhor Sharma
@Vibhor7_7
·
Apr 17
Love this. Really appreciate the blog breaking everything down.
317
Owlcat Games
@OwlcatGames
Ad
Take the helm and step into your Expanse story. WISHLIST Action RPG The Expanse: Osiris Reborn on Steam
From steampowered.com
715K
Cyan Ding
@cyansding
·
Apr 17
this tuf bro
392
NILAY1556
@NILAY1556
·
Apr 17
It's been my dream for long time to do something like that , impressive work Happy for you guyz to see you got much recognize by big giants Just great
233
Ekamsat
@singularitywhat
·
Apr 17
Coder kullu.
440
mikael haji
@mikaelhaji
·
Apr 17
very nice!
365
Cranky742
@SUPERcranky247
·
Apr 18
Welp, you clearly get a FOLLOW.
53
Ajith Bondili
@AjithBondili
·
Apr 17
W
428
austin jian
@austinjian_
·
Apr 17
amazing
508
Pratham Agarwal
@Prathamagarwalx
·
Apr 17
@bernhardsson
and modal on top
448
Lucas Jin
@lucashjin
·
Apr 17
w aadi
614
^HI^
@HI39767037
·
Apr 17
Why do you need A100s to train a 12 million parameter model? I was able to train a 30 million parameter model quite easily on a 4070
191
sijibomi
@oluwasijirama
·
Apr 17
this is my end of year project, congrats it's soo fucking cool.
320
Harsh
@harshshelby
·
Apr 17
Y’all are seriously crack
220
Nikhil Hooda
@_nikhilhooda
·
Apr 17
this is fire
645
maxi
@pachelife
·
Apr 17
this is freaking cool
215
Akash
@akashlak_
·
Apr 17
Super cool!
403
Nertiga K
@noodlz06
·
Apr 17
Sick
306
Akram Jamil
@akramj_13
·
Apr 17
cracked
361
Teja
@tejalogs
·
Apr 17
scaling past 10k concurrent users will expose the real kernel perf bottlenecks i bet
59
Raghav
@millerscoded
·
Apr 18
That's a monster of a model. You're basically asking it to hold a PhD in linguistics.
20
BLANPLAN | 空界計劃
@blanplan
·
Apr 18
Writing flash attention CUDA kernels from scratch for a 12M model is probably the fastest way to actually understand transformers. The WebGPU fallback is a nice touch too. Most projects at this scale don't bother with non-NVIDIA.
64
Yash Deshmukh
@yashvcdeshmukh
·
Apr 18
This is very cool
28
Sandeep Kamble
@SandeepL337
·
Apr 18
@modal
do you have any process to apply credit for research ?
26
Satvik Garimella
@satvikgari
·
2h
This is so sick!
4
XM
@xm_build
·
Apr 17
the framework from scratch thing proves the bottleneck was never the model. it was always the harness
62
Julius
@juliussland
·
Apr 18
That’s impressive! Great work
29
andy
@1a1n1d1y
·
Apr 18
have you heard of rvLLM?
68
忍者
@byteprobe
·
2h
impressive, good stuff!
3
Moe
@Moemahmud
·
14h
Really impressive & excited to see what you achieve next
10
Arya
@aryamun22
·
23h
Mogger
22
Ola
@Major101x
·
Apr 17
This is impressive! I need to work harder!
63
ClickHouse
@ClickHouseDB
Ad
We use coding agents in ClickHouse, and they are a great tool for certain scenarios. ClickHouse itself is the primary component for agentic analytics and AI infrastructure. If you are a strong engineer and aren't afraid of AI, join ClickHouse!
Agentic coding at ClickHouse
From clickhouse.com
17M
00:21:43