Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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...

829,709 Aufrufe • vor 6 Monaten •via X (Twitter)

55 Kommentare

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Everything is open source, and we wrote a thorough blog breaking down everything we did so you guys can learn. Repo: Blog:

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Test the LLM and view the probability distribution of next tokens. All running in the browser using our own framework.

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

As per @ClementDelangue's suggestion, I uploaded the model to HuggingFace. Feel free to check it out and run the model yourself:

Profilbild von clem 🤗
clem 🤗vor 6 Monaten

you should share the model on

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Will most definitely do 🔥

Profilbild von Gavin
Gavinvor 6 Monaten

Love it. Dm me?

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

For sure!

Profilbild von Sanjoy Das
Sanjoy Dasvor 6 Monaten

Nice! Would love to get your take on cuTile Rust:

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Looks interesting, will play around with it a bit and share my thoughts 👀

Profilbild von Bryce, the CUDA Colonel
Bryce, the CUDA Colonelvor 6 Monaten

DM me if you wanna chat about Rust for GPU programming!

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Will definitely reach out, even before I got into AI I did a lot of GPU programming work related to game development and rendering 🔥

Profilbild von Taelin
Taelinvor 6 Monaten

cost?

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

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

Profilbild von stan p
stan pvor 6 Monaten

waterloo strikes again

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

have to live up to the name

Profilbild von Ken Wu
Ken Wuvor 6 Monaten

how did i get into the same school as this beast

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Lmaooo 🙈

Profilbild von Kenny Guo
Kenny Guovor 6 Monaten

first principles 🫡

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Yessir 🔥

Profilbild von dnu
dnuvor 6 Monaten

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?

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

We had a lot of bugs with our CUDA kernels that had to be addressed before the training started to go well 😂

Profilbild von Yechan Do
Yechan Dovor 6 Monaten

This is so impressive. Can I use your work at my lecture for education purpose ?

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

@yechan_ai Yes of course, we’re honoured 🔥

Profilbild von Saurabh Kumar
Saurabh Kumarvor 6 Monaten

What are they feeding Waterloo undergrads

Profilbild von ayush
ayushvor 6 Monaten

my goats @_reesechong and @MankyDankyBanky this is insane

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

@_reesechong Ty bro 🙏

Profilbild von Xander Chin
Xander Chinvor 6 Monaten

fire

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Appreciate it, TinyTPU was a big inspo

Profilbild von ani
anivor 6 Monaten

🐐

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

nah you inspired me fr

Profilbild von Ricky Tang
Ricky Tangvor 6 Monaten

this is crazy bro

Profilbild von alexine 🏴‍☠️
alexine 🏴‍☠️vor 6 Monaten

very cool, great work!

Profilbild von EDITH
EDITHvor 6 Monaten

This is fucking great man!!!

Profilbild von Kaibo Huang
Kaibo Huangvor 6 Monaten

@lucashjin good stuff aadi🔥

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

@lucashjin Thanks Kaibo looking forward to Bear hacks

Profilbild von mikael haji
mikael hajivor 6 Monaten

very nice!

Profilbild von Aryan Dhawan
Aryan Dhawanvor 6 Monaten

Amazing

Profilbild von Akram Jamil
Akram Jamilvor 6 Monaten

@nicholaschen__ cracked

Profilbild von Benedict Kerres
Benedict Kerresvor 6 Monaten

Well done

Profilbild von Rhys Campbell
Rhys Campbellvor 6 Monaten

@hnshah Part time model builder, full time looksmaxxer

Profilbild von Freeman Jiang
Freeman Jiangvor 6 Monaten

good stuff

Profilbild von Moulik
Moulikvor 6 Monaten

holy cracked

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

thanks moulik!

Profilbild von NILAY1556
NILAY1556vor 6 Monaten

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

Profilbild von evan
evanvor 6 Monaten

nice work!!

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Thanks so much Evan!

Profilbild von Nikhil Sonti
Nikhil Sontivor 6 Monaten

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 commodification speed is wild

Profilbild von Lucas Jin
Lucas Jinvor 6 Monaten

@imdonghakim w aadi

Profilbild von sanjay prasad hs
sanjay prasad hsvor 6 Monaten

Super cool stuff, man, super cool.

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Thanks man!

Profilbild von benkigera
benkigeravor 6 Monaten

Reminds me of what LLMs are doing under the hood.

Profilbild von Dev Shorya
Dev Shoryavor 6 Monaten

thats actually insane. most people talk about it, you actually built it. the rust + cuda combo is hard mode too

Profilbild von Ajith Bondili
Ajith Bondilivor 6 Monaten

@anirudhbv_ce W

Profilbild von 1jmdev
1jmdevvor 6 Monaten

Please update the demo page so it caches the model on user device it is really cool but please cache it on user device

Profilbild von Aadi Kulshrestha
Aadi Kulshresthavor 6 Monaten

Good point, will try to get this out soon!

Ähnliche Videos

Ben Thompson explains how LLMs greatly diminished Nvidia's CUDA moat even as they sent the stock to the moon "So the weird thing about large language models is they were obviously incredible for Nvidia. That's why their stock went to the moon." "They have been on and off the most valuable company in the world." "It was also very bad for Nvidia. And the reason it was bad for Nvidia is that the play with CUDA is to build a developer ecosystem on top of CUDA." "But CUDA only works on Nvidia GPUs. So you get CUDA for free. It's easier to use, and it's a tremendous investment. Nvidia almost went under trying to build CUDA at a time when no one understood what they were doing or why they were wasting money on it." "And that's why Jensen Huang will get bristly, particularly when people question their rent-seeking or profit, whatever. It's like, no, they earned their spot fair and square." "Absolutely. It shouldn't be forgotten. They have earned every dollar they've gotten through 25 years of taking massive risks." "It bottomed out in October 2022. I wrote an article like three weeks before ChatGPT came out, tracing their bottoming-out history and their search for what was next." "'Nvidia in the Valley.' So, go back to this GTC. So I wrote an article at the time called 'Nvidia Waves and Moats'." "And what was interesting about that GTC was, number one, it was very boring. All the cool stuff kind of got scrubbed out." "Now, Jensen Huang has brought that stuff back, so the last few GTCs he's more talking about other things. Now it comes across as, oh, you're still looking for something beyond the LLM." "Because the problem with the LLM is it shifts the developer platform far above where Nvidia sits. All the activity is happening on top of LLMs. And so no one who's writing an AI application today is using CUDA." "Now, some people are, if you're training your own model and you're doing some low-level things or non-LLM things." "But the vast majority of the energy and all the money and the ecosystem is far removed from CUDA." "They have no idea and don't need to know or care what chips their application is running on. They're just on the OpenAI API, or the Anthropic API, or using Bedrock on Amazon, and it's sitting on Trainium, and they're using a Chinese open-source model. It's totally abstracted away, and this is why LLMs were bad for Nvidia." "Now, again, all the money they made along the way is worth it, but their moat has been tremendously diminished." "CUDA is still a moat if you need to do stuff that requires CUDA. But the vast majority of stuff, in energy, doesn't require CUDA, like in a post-LLM world."

Fireside Alpha

12,980 Aufrufe • vor 2 Monaten