Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

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 görüntüleme • 6 ay önce •via X (Twitter)

55 Yorum

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

clem 🤗 profil fotoğrafı
clem 🤗6 ay önce

you should share the model on

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Will most definitely do 🔥

Gavin profil fotoğrafı
Gavin6 ay önce

Love it. Dm me?

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

For sure!

Sanjoy Das profil fotoğrafı
Sanjoy Das6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

Bryce, the CUDA Colonel profil fotoğrafı
Bryce, the CUDA Colonel6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

Taelin profil fotoğrafı
Taelin6 ay önce

cost?

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

stan p profil fotoğrafı
stan p6 ay önce

waterloo strikes again

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

have to live up to the name

Ken Wu profil fotoğrafı
Ken Wu6 ay önce

how did i get into the same school as this beast

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Lmaooo 🙈

Kenny Guo profil fotoğrafı
Kenny Guo6 ay önce

first principles 🫡

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Yessir 🔥

dnu profil fotoğrafı
dnu6 ay önce

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?

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

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

Yechan Do profil fotoğrafı
Yechan Do6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

@yechan_ai Yes of course, we’re honoured 🔥

Saurabh Kumar profil fotoğrafı
Saurabh Kumar6 ay önce

What are they feeding Waterloo undergrads

ayush profil fotoğrafı
ayush6 ay önce

my goats @_reesechong and @MankyDankyBanky this is insane

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

@_reesechong Ty bro 🙏

Xander Chin profil fotoğrafı
Xander Chin6 ay önce

fire

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Appreciate it, TinyTPU was a big inspo

ani profil fotoğrafı
ani6 ay önce

🐐

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

nah you inspired me fr

Ricky Tang profil fotoğrafı
Ricky Tang6 ay önce

this is crazy bro

alexine 🏴‍☠️ profil fotoğrafı
alexine 🏴‍☠️6 ay önce

very cool, great work!

EDITH profil fotoğrafı
EDITH6 ay önce

This is fucking great man!!!

Kaibo Huang profil fotoğrafı
Kaibo Huang6 ay önce

@lucashjin good stuff aadi🔥

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

@lucashjin Thanks Kaibo looking forward to Bear hacks

mikael haji profil fotoğrafı
mikael haji6 ay önce

very nice!

Aryan Dhawan profil fotoğrafı
Aryan Dhawan6 ay önce

Amazing

Akram Jamil profil fotoğrafı
Akram Jamil6 ay önce

@nicholaschen__ cracked

Benedict Kerres profil fotoğrafı
Benedict Kerres6 ay önce

Well done

Rhys Campbell profil fotoğrafı
Rhys Campbell6 ay önce

@hnshah Part time model builder, full time looksmaxxer

Freeman Jiang profil fotoğrafı
Freeman Jiang6 ay önce

good stuff

Moulik profil fotoğrafı
Moulik6 ay önce

holy cracked

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

thanks moulik!

NILAY1556 profil fotoğrafı
NILAY15566 ay önce

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

evan profil fotoğrafı
evan6 ay önce

nice work!!

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Thanks so much Evan!

Nikhil Sonti profil fotoğrafı
Nikhil Sonti6 ay önce

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

Lucas Jin profil fotoğrafı
Lucas Jin6 ay önce

@imdonghakim w aadi

sanjay prasad hs profil fotoğrafı
sanjay prasad hs6 ay önce

Super cool stuff, man, super cool.

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Thanks man!

benkigera profil fotoğrafı
benkigera6 ay önce

Reminds me of what LLMs are doing under the hood.

Dev Shorya profil fotoğrafı
Dev Shorya6 ay önce

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

Ajith Bondili profil fotoğrafı
Ajith Bondili6 ay önce

@anirudhbv_ce W

1jmdev profil fotoğrafı
1jmdev6 ay önce

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

Aadi Kulshrestha profil fotoğrafı
Aadi Kulshrestha6 ay önce

Good point, will try to get this out soon!

Benzer Videolar

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 görüntüleme • 2 ay önce