Skip navigation
gpu poor? I wrote a simple distributed training module to train a vision model on three M1 macbooks.
0:00 / 2:41

gpu poor? I wrote a simple distributed training module to train a vision model on three M1 macbooks.

omkaar

@omkizzy4.3K followers

Visit on X
763 likesDownloadOriginal post

104,325 views

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 out their macbooks during exam season LOL. i pivoted it to a federated learning module (where network costs are acceptable). it still needs more tweaks like removing the centralized datastore and compressing payloads but its 90% there :) so contributors are welcome federated learning is a hard problem to productionize... but its not that hard to understand. thanks to Javier Fernandez from Flower (hiring!) for giving me tips on optimizations. got questions? shoot away :)

65 Comments

Comments from the original post on X (Twitter)

  • parth's profile picture

    @parthsareen

    wake up babe omkaar just dropped federated learning 🤩

    11 likes

  • omkaar's profile picture

    @omkizzy

    😂😂😂

    4 likes

  • omkaar's profile picture

    @omkizzy

    shout out @parthsareen for the code reviews

    8 likes

  • omkaar's profile picture

    @omkizzy

    also shoutout @awnihannun for the mlx idea

    2 likes

  • sid's profile picture

    @_vcs__

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

    2 likes

  • omkaar's profile picture

    @omkizzy

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

    5 likes

  • sid's profile picture

    @_vcs__

    @PrimeIntellect Would love to see your approach

    2 likes

  • siddhartha's profile picture

    @sidthekid66

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

    2 likes

  • Harry's profile picture

    @ShellZero

    Brilliant 🔥👏👏

    1 like

  • Yaya Soumah's profile picture

    @YayaSoumah

    That’s a very interesting concept!!

    1 like

  • Mathieu Tuli's profile picture

    @TuliMathieu

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

    1 like

  • omkaar's profile picture

    @omkizzy

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

    1 like

  • Mathieu Tuli's profile picture

    @TuliMathieu

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

    1 like

  • omkaar's profile picture

    @omkizzy

    @TarianLovesArch i would still love contributions + optimizations!

    1 like

  • Mathieu Tuli's profile picture

    @TuliMathieu

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

    1 like

  • omkaar's profile picture

    @omkizzy

    @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

    2 likes

  • Mathieu Tuli's profile picture

    @TuliMathieu

    Loool i fucking feel that

    1 like

  • HDP's profile picture

    @HDPbilly

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

    1 like

  • omkaar's profile picture

    @omkizzy

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

  • Atharva Pingale's profile picture

    @iamatharvap

    Does this also work with non-macs ?

    1 like