Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 6 месяцев назад •via X (Twitter)

Комментарии: 55

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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

Фото профиля clem 🤗
clem 🤗6 месяцев назад

you should share the model on

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Will most definitely do 🔥

Фото профиля Gavin
Gavin6 месяцев назад

Love it. Dm me?

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

For sure!

Фото профиля Sanjoy Das
Sanjoy Das6 месяцев назад

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

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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

Фото профиля Bryce, the CUDA Colonel
Bryce, the CUDA Colonel6 месяцев назад

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

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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
Taelin6 месяцев назад

cost?

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

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
stan p6 месяцев назад

waterloo strikes again

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

have to live up to the name

Фото профиля Ken Wu
Ken Wu6 месяцев назад

how did i get into the same school as this beast

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Lmaooo 🙈

Фото профиля Kenny Guo
Kenny Guo6 месяцев назад

first principles 🫡

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Yessir 🔥

Фото профиля dnu
dnu6 месяцев назад

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
Aadi Kulshrestha6 месяцев назад

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

Фото профиля Yechan Do
Yechan Do6 месяцев назад

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

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

@yechan_ai Yes of course, we’re honoured 🔥

Фото профиля Saurabh Kumar
Saurabh Kumar6 месяцев назад

What are they feeding Waterloo undergrads

Фото профиля ayush
ayush6 месяцев назад

my goats @_reesechong and @MankyDankyBanky this is insane

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

@_reesechong Ty bro 🙏

Фото профиля Xander Chin
Xander Chin6 месяцев назад

fire

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Appreciate it, TinyTPU was a big inspo

Фото профиля ani
ani6 месяцев назад

🐐

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

nah you inspired me fr

Фото профиля Ricky Tang
Ricky Tang6 месяцев назад

this is crazy bro

Фото профиля alexine 🏴‍☠️
alexine 🏴‍☠️6 месяцев назад

very cool, great work!

Фото профиля EDITH
EDITH6 месяцев назад

This is fucking great man!!!

Фото профиля Kaibo Huang
Kaibo Huang6 месяцев назад

@lucashjin good stuff aadi🔥

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

@lucashjin Thanks Kaibo looking forward to Bear hacks

Фото профиля mikael haji
mikael haji6 месяцев назад

very nice!

Фото профиля Aryan Dhawan
Aryan Dhawan6 месяцев назад

Amazing

Фото профиля Akram Jamil
Akram Jamil6 месяцев назад

@nicholaschen__ cracked

Фото профиля Benedict Kerres
Benedict Kerres6 месяцев назад

Well done

Фото профиля Rhys Campbell
Rhys Campbell6 месяцев назад

@hnshah Part time model builder, full time looksmaxxer

Фото профиля Freeman Jiang
Freeman Jiang6 месяцев назад

good stuff

Фото профиля Moulik
Moulik6 месяцев назад

holy cracked

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

thanks moulik!

Фото профиля NILAY1556
NILAY15566 месяцев назад

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
evan6 месяцев назад

nice work!!

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Thanks so much Evan!

Фото профиля Nikhil Sonti
Nikhil Sonti6 месяцев назад

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
Lucas Jin6 месяцев назад

@imdonghakim w aadi

Фото профиля sanjay prasad hs
sanjay prasad hs6 месяцев назад

Super cool stuff, man, super cool.

Фото профиля Aadi Kulshrestha
Aadi Kulshrestha6 месяцев назад

Thanks man!

Фото профиля benkigera
benkigera6 месяцев назад

Reminds me of what LLMs are doing under the hood.

Фото профиля Dev Shorya
Dev Shorya6 месяцев назад

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

Фото профиля Ajith Bondili
Ajith Bondili6 месяцев назад

@anirudhbv_ce W

Фото профиля 1jmdev
1jmdev6 месяцев назад

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
Aadi Kulshrestha6 месяцев назад

Good point, will try to get this out soon!

Похожие видео

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 просмотров • 2 месяцев назад