正在加载视频...

视频加载失败

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 个月前