Loading video...

Video Failed to Load

Go Home

gpu poor? I wrote a simple distributed training module to train a vision model on three M1 macbooks. it's open sourced! i wanted to build a distributed training tool for M-series macs but I faced two hurdles: network latency is extremely high and my friends weren't happy with lending...

104,325 views • 2 years ago •via X (Twitter)

65 Comments

parth's profile picture
parth2 years ago

wake up babe omkaar just dropped federated learning 🤩

omkaar's profile picture
omkaar2 years ago

😂😂😂

omkaar's profile picture
omkaar2 years ago

shout out @parthsareen for the code reviews

omkaar's profile picture
omkaar2 years ago

also shoutout @awnihannun for the mlx idea

sid's profile picture
sid2 years ago

Can't it be made decentralised (in terms of the aggregator) to eliminate the single point of failure

omkaar's profile picture
omkaar2 years ago

yeah i dont see why not, there are a few companies working on that idea like @PrimeIntellect

sid's profile picture
sid2 years ago

@PrimeIntellect Would love to see your approach

siddhartha's profile picture
siddhartha2 years ago

federated learning opens up entirely new use cases for ml as intelligence is democratized. keep data decentralized and train across networks.

Harry's profile picture
Harry2 years ago

Brilliant 🔥👏👏

Yaya Soumah's profile picture
Yaya Soumah2 years ago

That’s a very interesting concept!!

Mathieu Tuli's profile picture
Mathieu Tuli2 years ago

pro tip, post the git link - looks cool - might work on an mlx version this week if I have time

omkaar's profile picture
omkaar2 years ago

@TarianLovesArch Ah I actually did not make it clear that this supports mlx as well. its actually a very simple change from my repo, just import ml and change the file but retain the variables. I'll make a post on this later.

Mathieu Tuli's profile picture
Mathieu Tuli2 years ago

Makes sense yeah that’s what I figured - very cool

omkaar's profile picture
omkaar2 years ago

@TarianLovesArch i would still love contributions + optimizations!

Mathieu Tuli's profile picture
Mathieu Tuli2 years ago

Yeah I plan on digging in this week see what I can do (although I’m sure it’s 100% perfect)

omkaar's profile picture
omkaar2 years ago

@TarianLovesArch dawg between a full-time job and contracting, I only get a few hours a week to work on this loooool, im sure you will find many areas of optimization that I did not want to spend my time on

Mathieu Tuli's profile picture
Mathieu Tuli2 years ago

Loool i fucking feel that

HDP's profile picture
HDP2 years ago

have you considered @shog_AGI for some part of the datastorage?

omkaar's profile picture
omkaar2 years ago

@shog_AGI not really havent looked into them but i am fine w distributed in-device storage

Atharva Pingale's profile picture
Atharva Pingale2 years ago

Does this also work with non-macs ?

omkaar's profile picture
omkaar2 years ago

yup, just change device in from device("mps") to device("cpu")

Silen Naihin's profile picture
Silen Naihin2 years ago

this is sick!!

omkaar's profile picture
omkaar2 years ago

thank you!!

JaysmooveV2's profile picture
JaysmooveV22 years ago

Bro cooked again 👨‍🍳🔥

omkaar's profile picture
omkaar2 years ago

!!!

Bassel Al Omari's profile picture
Bassel Al Omari2 years ago

Goat-Tier video

Virat Chauhan's profile picture
Virat Chauhan2 years ago

Soo going to milk my friends' macs for what they are worth with this now 😈

omkaar's profile picture
omkaar2 years ago

😈😈😈

eggo's profile picture
eggo2 years ago

I've been super interested in this idea for a while. Great work! I'm interested in helping if possible

omkaar's profile picture
omkaar2 years ago

ofc repo is completely free use, you can edit, redistribute, etc!

NIK's profile picture
NIK2 years ago

🔥

LA Bloke's profile picture
LA Bloke2 years ago

Can't you just use Ray Train?

omkaar's profile picture
omkaar2 years ago

ray train inspired me to build this lol, this was something I built in 12 hours for fun

io ɳ's profile picture
io ɳ2 years ago

Hi @omkizzy can you train a model with those three Mac if they are separated at a long distance?

omkaar's profile picture
omkaar2 years ago

yeah but the network costs would be astronomical, but my module here does support that

io ɳ's profile picture
io ɳ2 years ago

Okay,… So what if you increase The number of Mac’s will the “network cost” would decrease or that is not the factor at all?

omkaar's profile picture
omkaar2 years ago

in an ideal world, not a factor at all

io ɳ's profile picture
io ɳ2 years ago

Okay,… I hope it becomes a bigger thing man. And I will go through it on GitHub so I can understand more and if I will have some more questions I will ask you then.

omkaar's profile picture
omkaar2 years ago

ofc i welcome all questions! it already is a big thing, really cool companies like @flwrlabs are working on similar ideas!

io ɳ's profile picture
io ɳ2 years ago

@flwrlabs Yeah yeah , I just saw someone mention @flwlabs on your feed , it is so cool 😎 man

Ankur Shukla's profile picture
Ankur Shukla2 years ago

Awesome. This idea as crossed me multiple times. Happy to see it being implemented

pooria's profile picture
pooria2 years ago

@omkizzy you’re the hero we didn’t know about but need lol p.s. what are you up to May10-12?

omkaar's profile picture
omkaar2 years ago

im going to be in school, down to miss if you have something interesting going on 👀

omkaar's profile picture
omkaar2 years ago

cc: @parthsareen

pooria's profile picture
pooria2 years ago

@parthsareen @parthsareen come share extensible AI with the builders too!

Javier Fernandez's profile picture
Javier Fernandez2 years ago

Great video, once again!!

VA's profile picture
VA2 years ago

If you ever need more compute try @PrimeIntellect

thecollabagepatch's profile picture
thecollabagepatch2 years ago

@yikesawjeez 👀

omkaar's profile picture
omkaar2 years ago

@yikesawjeez they were kind enough to repost!

thecollabagepatch's profile picture
thecollabagepatch2 years ago

@yikesawjeez this project speaks for itself cooler release than llama3 tbh lfg

omkaar's profile picture
omkaar2 years ago

@yikesawjeez no way thats a huge compliment thank u!

yikes (:D/acc)'s profile picture
yikes (:D/acc)2 years ago

@thepatch_kev we love distributed computing @BacalhauProject , @BigscienceW , @m_ryabinin , check it out. maybe swap notes/grant offers with our friend here ;)

omkaar's profile picture
omkaar2 years ago

@thepatch_kev @BacalhauProject @BigscienceW @m_ryabinin would love to chat w anyone interested!

Amrit Chera's profile picture
Amrit Chera2 years ago

Setting the standards for video quality! Great stuff here 👏

omkaar's profile picture
omkaar2 years ago

@AmritBuilds recorded on my iphone!

Tony Kam's profile picture
Tony Kam2 years ago

this is dope dude!

omkaar's profile picture
omkaar2 years ago

thank you!

TiskTusk's profile picture
TiskTusk2 years ago

The GPU poors shall be vindicated

μ-go's profile picture
μ-go2 years ago

@TiskTusk

Nag's profile picture
Nag2 years ago

Yoo, any tutorial on how u built it? Curious lol

omkaar's profile picture
omkaar2 years ago

it will take me some time to do that man, there is a lot going on lol

AK's profile picture
AK10 months ago

federated learning on macbooks is honestly genius. network latency is the real bottleneck but gradient compression + local sgd steps could help. m1 metal api >

Chris 🇭🇷🇮🇪's profile picture
Chris 🇭🇷🇮🇪2 years ago

Really cool project. Just made a PR to speed things up and for the learning to continue if one of the learners fails.

omkaar's profile picture
omkaar2 years ago

sick will check it out later!

Ashwin 🇮🇳's profile picture
Ashwin 🇮🇳2 years ago

So you expect a guy to have poor GPU but have 3 M1 Macbooks 🥴

Related Videos

Let's talk about training and how hard you need to push yourself at home before you go for any trials. I remember when I knew that I will be traveling for a trial, i stopped going out of my neighbourhood to play football and I just locked in on training for 2month straight. I will do a roadside jogging from my house to the pitch at Ashiribo and I will train for like 2hrs or more and that was my routine every week except Sundays to rest and I did that for 2 months. Victor McDonald assigned me a coach to train and get me ready and he was by far the hardest I have ever trained. Days where I will tie a tyre around my waist to run on the sand, I did a lot of running,strength training, speed work on the sand with tyre. People who see me train have no idea why I was k!lling myself to train that hard. I once trained with Raphael Edereho a guy who I was looking up at that time and I was not able to walk for 2 days after training with him. I trained like my life depends on it. And I stayed away from many things that will slow me down like, bad friends, drinking, sm0king, including girls and I was just locked in on my purpose to make it happen and it paid off. After 3 months that I left Nigeria the news broke out that I signed for Sölvesborg GIF and People were surprised to see it in the news paper and even my father got asked questions like how or when did I traveled. I thought I trained well enough but to my surprise I was no where near ready at all. I couldn't believe what I saw during the trainings I had to call one of my coaches back home and tell him how hard the trainings are for me. The new generation of young players don't like to train and they except someone to just come and say I will take you to trials. Many have failed not because they don't have the talent but because they don't train enough to meet the standards and social media has made them think otherwise. Your preparation is the most important thing you can do for sure yourself and just like Kobe Bryant said if you are well prepared for it you will not be afraid of failure.

Abiola Dauda

15,507 views • 4 months ago