Distributed Training with PyTorch: complete tutorial with cloud infrastructure and code

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 57

  • @rachadlakis1
    @rachadlakis1 Před 7 dny +1

    That's an amazing resource! It's great to see you sharing such detailed information on a complex topic. Your effort to explain everything clearly will really help others understand and apply these concepts. Keep up the great work!

  • @chiragjn101
    @chiragjn101 Před 8 měsíci +9

    Great video, thanks for creating this. I have use DDP quite a lot but seeing the visualizations for communication overlap helped me build a very good mental model.
    Would love to see more content around distributed training - Deepspeed ZeRO, Megatron DP + TP + PP

  • @tharunbhaskar6795
    @tharunbhaskar6795 Před měsícem +1

    Dang. Never thought learning DDP would be this easy. Another great content from Umar. Looking forward for FSDP

  • @amishasomaiya9891
    @amishasomaiya9891 Před 3 měsíci +2

    Starting to watch my 3rd video on this channel, after transformer from scratch and quantization. Thank you for the great content and also for the code and notes to look back again. Thank you.

  • @abdallahbashir8738
    @abdallahbashir8738 Před 5 měsíci +4

    I really love your vidoes. you have a natural talent on simplifying logic and code. in same capacity as Andrej

  • @user-td8vz8cn1h
    @user-td8vz8cn1h Před 5 měsíci +2

    This is second video Ive watched from this channel after "quantization". And frankly wanted to express my gratitude towards your work as it is very easy to follow and the level of abstractions is tenable to understand concepts holistically.

  • @karanacharya18
    @karanacharya18 Před 3 měsíci +2

    Super high quality lecture. You have a gift of teaching, man. Thank you!

  • @vasoyarutvik2897
    @vasoyarutvik2897 Před 4 měsíci +2

    this channel is hidden gem

  • @thuann2cats
    @thuann2cats Před měsícem +1

    absolutely amazing! You made these concepts so accessible!

  • @Maximos80
    @Maximos80 Před měsícem +1

    Incredible content, Umar! Well done! 🎉

  • @maleekabakhtawar3892
    @maleekabakhtawar3892 Před měsícem

    well explained each and every detail, Great work Great Explanation👍
    can you make this type of detailed video on distributed training through tensor parallelism? it would be very helpful. Thank you!

  • @vimukthirandika872
    @vimukthirandika872 Před 26 dny +1

    Really impressive!

  • @cken27
    @cken27 Před 8 měsíci +3

    Amazing content! Thanks for your sharing

  • @oliverhitchcock8436
    @oliverhitchcock8436 Před 8 měsíci +3

    Another great video, Umar. Nice work

  • @user-jf6li8mn3l
    @user-jf6li8mn3l Před 7 měsíci

    The video was very interesting and useful. Please make a similar video on DeepSpeed functionality. And in general, how to train large models (for example LLaMa SFT) on distributed systems (Multi-Server) when GPUs are located on different PCs.

  • @user-wm5xv5ei8o
    @user-wm5xv5ei8o Před 6 měsíci +1

    very nice and informative video. Thanks

  • @user-od3ig9qt6h
    @user-od3ig9qt6h Před 8 měsíci +2

    Thank you very much for your wonderful video. Can you teach a video on how to use the accelerate library with dpp?

  • @prajolshrestha9686
    @prajolshrestha9686 Před 8 měsíci +1

    Thankyou so much for this amazing video. It is really informative.

  • @810602jay
    @810602jay Před 8 měsíci +1

    Amazing learning stuff ! Very Thanks !~ 🥰🥰🥰

  • @nova2577
    @nova2577 Před 6 měsíci +1

    You deserve many more likes and subscribers!

  • @Engrbilal143
    @Engrbilal143 Před 6 měsíci

    Awesome video. Please make tutorial on FSDP as well

  • @riyajatar6859
    @riyajatar6859 Před 6 měsíci +1

    In broadcast , if we are sending the copy of file from rank 0 and rank 4 node to other node. How is the total time still 10 second. Because still I am having same internet speed of 1MB/s.
    Could anyone explain? I am bit confused.
    Also what happens if I am having odd numbers of nodes

  • @manishsharma2211
    @manishsharma2211 Před 8 měsíci +1

    you teach soooooooo good

  • @d.s.7857
    @d.s.7857 Před 8 měsíci +1

    Thank you so much for this

  • @hellochli
    @hellochli Před 8 měsíci +1

    Thanks!

    • @umarjamilai
      @umarjamilai  Před 8 měsíci

      谢谢你!我们在领英connect吧

  • @loong6127
    @loong6127 Před 5 měsíci +1

    Great video

  • @SaurabhK9012
    @SaurabhK9012 Před 28 dny

    Please create a video on model parallelism and FSDP.

  • @madhusudhanreddy9157
    @madhusudhanreddy9157 Před 8 měsíci

    If time permits for you, Please make an video for entire GPU and TPU and how to them effectively and most of us donno .
    please create a playlist for pytorch for beginners and intermediates.
    Thanks for reading.

  • @mdbayazid6837
    @mdbayazid6837 Před 8 měsíci +1

    Federated learning basics please.❤

  • @svkchaitanya
    @svkchaitanya Před 2 měsíci +1

    You rock always 😂

  • @felipemello1151
    @felipemello1151 Před 4 měsíci +1

    I wish i could like it twice

    • @umarjamilai
      @umarjamilai  Před 4 měsíci

      You can share it on social media. That's the best way to thank me 😇

    • @felipemello1151
      @felipemello1151 Před 4 měsíci

      @@umarjamilai not sure if it’s in your plans, but if you are open to suggestions, I would love to watch a video on multimodal models. Again, awesome work!

    • @umarjamilai
      @umarjamilai  Před 29 dny

      Check my latest video!

  • @user-el4uh3uk2k
    @user-el4uh3uk2k Před 6 měsíci +1

    fantastic

  • @rohollahhosseyni8564
    @rohollahhosseyni8564 Před 6 měsíci +1

    great video

  • @Yo-rw7mq
    @Yo-rw7mq Před 4 měsíci +1

    Great!

  • @mandarinboy
    @mandarinboy Před 7 měsíci

    Great intro video. Do you have any plans to also cover other parallelism: Model, Pipeline, Tensor, etc.

  • @ramprasath6424
    @ramprasath6424 Před 8 měsíci +1

    please do some thing related to audio large models like conformers,quartznet ,etc

  • @waynelau3256
    @waynelau3256 Před 4 měsíci

    Working with fsdp and megatron now and I really want to figure this out from scratch haha, it sounds fun but a big headache

  • @khoapham7303
    @khoapham7303 Před 8 měsíci +2

    I'm always confused with DP and DDP. Can you please tell me the difference between them? While both of them belong to data parallelism method.

    • @umarjamilai
      @umarjamilai  Před 8 měsíci +6

      DP only works on a single machine, while DDP can work on multiple machines. However, PyTorch now recommends using DDP also for single-machine setup.

    • @khoapham7303
      @khoapham7303 Před 8 měsíci

      @@umarjamilai thank you for your reply

  • @user-fw5sg5mx4m
    @user-fw5sg5mx4m Před 3 měsíci

    could provide another videos with respect to model parallel and pipeline parallel ? thanks..

  • @tryit-wv8ui
    @tryit-wv8ui Před 8 měsíci

    another banger

  • @sounishnath513
    @sounishnath513 Před 8 měsíci +1

    SUUUPERRRR

  • @madhusudhanreddy9157
    @madhusudhanreddy9157 Před 8 měsíci

    Hi Umar, Great video and enjoyed thorughly but i have one question.why are we using the approach of sum(grad1+grad2+....+gradN), why cant we use Avg of Gradients.

    • @umarjamilai
      @umarjamilai  Před 8 měsíci +2

      Of course you can (but you don't have to) use the average of the gradients. Actually, people usually take the average of the gradients. The reason we use the average is because we want the loss to be (more of less) the same as the non-distributed model, so you can compare the plots of the two. I don't know if PyTorch internally automatically takes the average of the gradients, I'd have to check the documentation/source.

    • @madhusudhanreddy9157
      @madhusudhanreddy9157 Před 8 měsíci

      @@umarjamilaithanks for the info.

  • @ai__76
    @ai__76 Před 4 měsíci

    How to do in Kubernetes? Please explain it.

  • @Erosis
    @Erosis Před 8 měsíci

    Wouldn't the accumulated gradient need to be divided by the total number of individual gradients summed (or the learning rate needs to be divided by this value) to make it equivalent?

    • @umarjamilai
      @umarjamilai  Před 8 měsíci +2

      Yes, if you want to treat the "cumulative gradient" as a big batch, then you'd usually divide it by the number of items to keep it equivalent to the single-item setup. But it's not mandatory: as a matter of fact, loss functions on PyTorch have a "reduction" parameter, which is usually set to "mean" (so dividing the loss by the number of items) but can also be set to "sum".
      One reason we usually calculate the "mean" loss is because we want to make comparisons between models with different hyperparameters (batch size), so the loss should not depend on the batch size.
      But remember that mathematically you don't have to

  • @milonbhattacharya4097
    @milonbhattacharya4097 Před 6 měsíci

    shouldnt loss be accumulated ? loss += (y_pred - y_actual)^0.5

    • @user-pt7gs2ei1r
      @user-pt7gs2ei1r Před 6 měsíci

      In my understanding, yes the loss is accumulated for one batch theoretically, and the gradients are computed based on this accumulated loss too. But in the parallel implementation, both the loss calculated in the feedforward process, and the gradients calculated in the back propagation process executed in a parallel way. Here @umarjamilai use a for loop to illustrate the de facto parallel mechanism.

  • @user-ze3ok8hh6c
    @user-ze3ok8hh6c Před 8 měsíci

    do you have a discord channel?

  • @Allen-TAN
    @Allen-TAN Před 8 měsíci +1

    Always great to watch your video, excellent work