Transformer Neural Networks - EXPLAINED! (Attention is all you need)

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 700

  • @CodeEmporium
    @CodeEmporium  Год назад +14

    For more details and code on building a translator using a transformer neural network, check out my playlist "Transformers from scratch": ruclips.net/video/QCJQG4DuHT0/видео.html

  • @ThisNameWasntTaken
    @ThisNameWasntTaken 4 года назад +795

    what a hugely underrated video. You did such a better job at explaining this on multiple abstraction layers in such a short video than most videos I could find on the topic which were more than twice as long.

    • @CodeEmporium
      @CodeEmporium  4 года назад +67

      Thanks a ton Jeffrey! Means a lot. I've come to realize (fairly recently) that only speaking in jargon isn't going to help. Pealing it down from highly abstract to more technical goes a long way for viewers and myself. I understand more when I break the jargon down. Using this more in future videos

    • @ThisNameWasntTaken
      @ThisNameWasntTaken 4 года назад +7

      @@CodeEmporium Of course everyone has a different approach to understanding a topic. I recently had to get into a few topics quite quickly and fore me the best way of getting there fast was to start out with very general videos to get a sort of feel for the general ideas and how everything works together on a high level. Then I would watch some more detailed videos or switch to reading more detailed articles until finally reading the actual papers and looking at the formulas and all that stuff.
      Having an understanding of the bigger picture helped me comprehend the details better.
      I Also think no explanation can ever be "too simple" cause sometimes when explanations try to save time by glossing over parts or taking things for granted you spend way more time rewinding trying to wrap your head about some small detail just because you might be missing some needed knowledge.
      I think in an explanation it's like with spices on food. better keep it simple and easy. Individuals can always skip parts for themselves. same with the spices: Better not add too much thinking everyone will be able to take it, rather add a little and if it's not enough for someone they can add it themselves.

    • @bhargavyagnik
      @bhargavyagnik 4 года назад

      So true man !! i scraped the net to find a simple explanation !! you are a genius :)

    • @joosthorskamp1736
      @joosthorskamp1736 4 года назад +1

      True, I did not understand the use of attention until watching this video

    • @sindhuorigins
      @sindhuorigins 4 года назад +2

      @@CodeEmporium Great approach that you've taken. A high level understanding followed by deeper understanding of the topic pretty much clears up the concept. Subscribed.

  • @PhilbertLin
    @PhilbertLin 4 года назад +227

    Great video! Watched it a few times already so these timestamps will help me out:
    0:00 Problems with RNNs and LSTMs
    3:34 First pass overview over transformer architecture
    8:10 Second pass with more detail
    10:34 Third pass focusing on attention networks and normalization
    11:57 Other resources (code & blog posts)

    • @CodeEmporium
      @CodeEmporium  4 года назад +6

      Thanks for this! It'll help others watching too.

    • @akkipant
      @akkipant 4 года назад +7

      @@CodeEmporium Pin this comment.

    • @mattcoakes5682
      @mattcoakes5682 4 года назад

      Thank you so much! I planned to watch this a few times for reference as I delve into transformer code. This will be very useful.

  • @ShotReverseShot
    @ShotReverseShot 3 года назад +82

    2:03 I died at the Vsauce reference. Well played.

    • @kekmeister42
      @kekmeister42 3 года назад +1

      Me too, I had to scroll back around 30s because he just continued explaining and I completely lost focus :D

    • @as5728-h1i
      @as5728-h1i 3 года назад

      :v

  • @danbochman
    @danbochman 4 года назад +41

    Wow.
    I've seen lectures that are 45m+ long trying to understand this architecture, even lectures from the original authors.
    Your video was hands-down the best, really helped me piece some key missing intuition pieces together.
    You have a gift for teaching and explaining -- I wholeheartedly hope you're able to leverage that in your professional career!

  • @Elanus19
    @Elanus19 3 года назад +91

    Incredibly well explained and concise. I can't believe you pulled off such a complete explanation in just 13 minutes!

    • @CodeEmporium
      @CodeEmporium  3 года назад +1

      Thank you for the kind words. Super glad you liked it :)

  • @HIMANSHUKUMARSINHA7
    @HIMANSHUKUMARSINHA7 2 года назад +2

    I bought udemy course for Transformer and BERT but with no help and wasted my time, money and energy. This video and your BERT video made my day. thanks. I may explain in my interview well. :)

  • @shipan5940
    @shipan5940 3 года назад +3

    By far, the MOST comprehensible explaination on Transformer available in the whole internet space.

    • @shipan5940
      @shipan5940 3 года назад +1

      You deserve 1M subscribers at least.

    • @CodeEmporium
      @CodeEmporium  2 года назад

      Thank you for the kind words! Maybe one day

  • @frederikbrammer
    @frederikbrammer 2 года назад +7

    This is by far the best explanation of the Transformers architecture that I have ever seen! Thanks a lot!

  • @lingding77
    @lingding77 3 года назад +23

    I love the multi-pass way of explanation so that the viewer can process high level concepts and then build upon that knowledge, great job.

  • @colorlace
    @colorlace 4 года назад +2

    The only thing that surprised me more than this high quality explanation is how you pronounce "mahtrix"

    • @CodeEmporium
      @CodeEmporium  4 года назад +1

      We live in the mahtrix...
      .
      .
      Sorry I'll leave.
      .
      .
      Psych. I'm staying since it's my channel. Haha.
      .
      .
      Please don't leave (Thanks for watching and reading this pointless rant)

  • @pipe_runner_lab
    @pipe_runner_lab Год назад +3

    I saw Yanik's explaination and now I saw yours. Yanik does a terrible job at explaining papers, he usually just jokes around. Your explanation is probably one of the best I have seen so far. Thanks man.

  • @gearoidmurphy4988
    @gearoidmurphy4988 4 года назад +86

    The multi-pass approach to progressively explaining the internals worked well. Thanks for your content!

    • @ajcosta
      @ajcosta 2 года назад +5

      The understanding converges!

  • @himeshph
    @himeshph 4 года назад +103

    @2:02 that vsauce thing was
    cool

  • @MrKfirlevi
    @MrKfirlevi 3 года назад +17

    Great video!! I am taking a course in my university and one of the lectures was about RNNs and transformers. Your video of 13 mins explains way better than the 100 mins lecture i attended. Thank you!

  • @snehashishpaul2740
    @snehashishpaul2740 2 года назад +3

    I had to make 2 passes of your video to fully understand and appreciate the underlying mathematics and working of the model. You have put a great effort in making it simpler to understand with illustration and animation.

  • @KrazeeKrab
    @KrazeeKrab Год назад +2

    This was a phenomenal video. You managed to explain transformers in 13 minutes better than my professor could in three hours.
    Thank you and keep on creating content!

  • @newginsam670
    @newginsam670 8 месяцев назад

    Bro
    TBH no words to appreciate such a well structured video in a short time and the explanation was easly understandable even for people with less knowledge.
    Thanks for the video man.

  • @tarat.techhh
    @tarat.techhh 4 года назад +6

    2:04 or are we... not gonna lie this is the best channel and best explanation ever....................

  • @vtrandal
    @vtrandal 2 года назад +3

    With videos like this one you should be having 100,000+ subscribers soon. Adding a bit of humor to uncompromising technical content is a very good way to go.

  • @jonathanburrell7055
    @jonathanburrell7055 Год назад +6

    This is awesome!!! Thank you for breaking it down concisely, understandably, and deeply! It’s hard to find explanations that aren’t so simplistic they’re useless, or so involved they don’t save time in achieving understanding. Thank you!!

    • @CodeEmporium
      @CodeEmporium  Год назад

      My pleasure! If you are into building the transformer piece by piece from scratch, I suggest checking out the “Transformers from scratch” playlist.

  • @adwaitpatil8300
    @adwaitpatil8300 10 месяцев назад

    One of the cleanest explanation for transformers without dabbling too much into the theory!! Thanks man

  • @wangy01
    @wangy01 2 года назад +2

    I watched this video four times. After each time, I feel I understand this topic better than the previous one.

  • @ahmedelayek2110
    @ahmedelayek2110 3 года назад +1

    what a guide for the transformer in just 13 min.
    thanks a lot for this simplicity.

  • @imagiro1
    @imagiro1 Год назад +1

    Thank you very much for you effort! You just adjusted my attention layer, the pieces start to fall in place and I have a much better understanding of why TNNs are so revolutionary.

  • @paragrk1
    @paragrk1 3 года назад +3

    Went through several videos on 'Attention is all you need' paper before this, all the details you managed to cover in thirteen minutes is amazing. Could not find explanation that is so easy to understand anywhere else. Great job!

    • @enjakuro7048
      @enjakuro7048 3 года назад

      right? I couldn't believe this video is only 13 minutes! That's a very good talent to have.

  • @langlansrobert8599
    @langlansrobert8599 3 года назад +3

    The easiest understanding video about this topic, as I can see! Thank you

  • @teetanrobotics5363
    @teetanrobotics5363 4 года назад +1

    Best Channel for ai and ml on RUclips

  • @finnberuldsen4798
    @finnberuldsen4798 Год назад

    Wonderful video, this clears up so much for me.

    • @CodeEmporium
      @CodeEmporium  Год назад

      Glad! I am currently building a transformer from scratch for additional context in my playlist “Transformers from scratch “

  • @PRUTHVIRAJRGEEB
    @PRUTHVIRAJRGEEB 4 года назад +9

    This is heavily underrated!! Such an awesome video! Thanks Man!

  • @vaishnavvaidheeswaran3692
    @vaishnavvaidheeswaran3692 Месяц назад

    I paused every 10 seconds and took notes, such an excellent video!

  • @moneyinahurry
    @moneyinahurry Год назад +3

    One of the best or probably the best explanation I've seen. Thank you very much for the effort.

  • @aram69420
    @aram69420 8 месяцев назад +2

    I don't know how many attention video I have watched. But I swear I'm getting there. Repetition is the key to understanding these shit

  • @abhishekbhatia651
    @abhishekbhatia651 4 года назад +2

    How do you pass the output tokens when they are something we want to predict? I think you pass whatever is generated as output, and since nothing is generated in the start, you pass the token.

  • @VaibhavPatil-rx7pc
    @VaibhavPatil-rx7pc Год назад

    TOP OF TOP clear explanation you provided !!!

  • @thegt
    @thegt Год назад

    This might be the best explanation for someone who has some experience with ANN and CNN but want to understand Transformers. Thanks!

  • @Sidnv
    @Sidnv 3 года назад +3

    Really great video. As someone transitioning from pure math into machine learning and AI, I find the language barrier to be the biggest hurdle and you broke down these concepts in a really clear way. I love the multiple layer approach you took to this video, I think it worked really well to first give a big picture overview of the architecture before delving deeper.

  • @dannysuarez6265
    @dannysuarez6265 4 года назад +2

    How is it possible such a beautiful video don't have more views/likes? Thank you CodeEmporium:)

  • @arunimachakraborty1175
    @arunimachakraborty1175 Год назад

    watching your videos for a last min revision. You're awesome

    • @CodeEmporium
      @CodeEmporium  Год назад

      Awesome! And Thank you! I do not deserve such compliments

  • @rahulchowdhury9739
    @rahulchowdhury9739 2 года назад

    I am half-way through this video. I have not finished it. But I felt giving a like before watching the next half. Thank you so much.

  • @ryanhewitt9902
    @ryanhewitt9902 2 года назад +2

    Thank you for making this! As a curious outsider I have been anxious about falling behind in recent years and this was perfect to bring me up to speed - at least enough to follow the conversation.

    • @CodeEmporium
      @CodeEmporium  2 года назад

      You are very welcome! Thanks for watching! :)

  • @arshiavashisht3481
    @arshiavashisht3481 Год назад

    Had to watch it like 2-3 times to get the entire thing, but worth it. Somehow so concise, yet every relevant detail is included.

    • @CodeEmporium
      @CodeEmporium  Год назад +1

      Thanks a lot for watching and commenting! Super happy this video gave you value

  • @mattcoakes5682
    @mattcoakes5682 4 года назад +5

    LOVE the multipass strategy for explaining the architecture. I don't think I've seen this approach used with ML, and it's a shame as this is an incredibly useful strategy for people like me trying to play catch up. I hopped on the ML train a little late, but stuff like this makes me feel not nearly as lost.

  • @simonevagnoni1758
    @simonevagnoni1758 3 года назад +3

    Your way to breaking down step by step is very effective! Congrats and thanks. School systems should use it more

  • @arrasuraparamesh1090
    @arrasuraparamesh1090 2 года назад +2

    A very good explanation about transformers, Thank you :)

  • @navinahmed
    @navinahmed 4 года назад +4

    Didnt know what a transformer hype was until I landed on this video. Thanks a lot ! Subscribed. Gotta check more content on this channel now

  • @adammbq
    @adammbq 2 года назад +1

    At 8:50, where did those ‘8’ attention vectors come from?

  • @NoOne-sy5fg
    @NoOne-sy5fg Год назад +3

    Great video bro! You're underrated af. One of the best if not the best explanation of some neural network architecture. Keep up the good work. Kudos!

    • @CodeEmporium
      @CodeEmporium  Год назад +1

      Thanks so much! I am making more related videos. So do check ‘em out :)

  • @tictacX1
    @tictacX1 4 года назад +3

    Good job CodeEmporium! Very well made overview. thanks.

  • @klam77
    @klam77 Год назад

    BEAUTIFUL......deep, concise, pithy, each word is meaningful.....well done.

  • @ApprovingSeal
    @ApprovingSeal 2 года назад

    Finally a basic explanation I can understand. I tried reading the original "Attention is all you need" paper, but it felt like it was assuming I was already familiar with the basics of NLP, like the encoder-decoder setup. Which I wasn't.

  • @d63810728
    @d63810728 4 года назад

    This is by far the most comprehensive yet short video i haave seen

  • @bauwndule
    @bauwndule 3 года назад

    Best explanation ever. I have an interview with Microsoft tomorrow. This was the best brushing up I could get.

  • @ScriptureFirst
    @ScriptureFirst 4 года назад +3

    KEEP IT UP! Please! This is outstanding :) love the diagrams, dry crisp active speaking, & overview technique.

  • @seungjungjin9217
    @seungjungjin9217 4 года назад +7

    Great video! I love how you go through multiple passes, each getting into deeper specifics!

  • @NicholasRenotte
    @NicholasRenotte 2 года назад

    Oh man I’m going through this now! Didn’t even realise you had a vid on it, this is brilliant. Love that you did a bird’s eye pass then dove in.

    • @CodeEmporium
      @CodeEmporium  2 года назад +1

      You're saying you liked my content without watching this video? You must be a true fan of mine mwahahaa..also thanks for the kind words :)

    • @NicholasRenotte
      @NicholasRenotte 2 года назад

      @@CodeEmporium I mean, tbf, I clicked like before watching it because it's you, then I was like dayyyyuuumm this is great.

  • @anirudha_ani
    @anirudha_ani 3 года назад

    Best explanation ! "Multi pass" way of explaining is genius.

  • @gurudevilangovan
    @gurudevilangovan 3 года назад

    Wow. Amazing video. Better than anything I've watched on the topic, all in thirteen minutes.

  • @cPho3nix
    @cPho3nix 4 года назад

    That was the best way of explaining thins in my opinion. Start big picture, getting more detailed over time.

  • @DK-ox7ze
    @DK-ox7ze Год назад +1

    I wonder why we don't have so many foundational LLMs if there are so many people like this guy who know ML so well? Is it purely because of financial reasons (huge cost of training these models)?

  • @karakadir8860
    @karakadir8860 10 месяцев назад

    dude you absolutely deserve each and any subsriber. thank you very much for your highly helpful and quality content.

    • @CodeEmporium
      @CodeEmporium  10 месяцев назад

      Thanks so much for the lovely comment! And also for subscribing! More to come!

  • @mr.dineshlee
    @mr.dineshlee 2 года назад +2

    I watched many videos related to this topic, but this video taught me easiest way...

    • @CodeEmporium
      @CodeEmporium  2 года назад +1

      Thanks for watching! And for the compliments :) I try my best for my more recent videos too

  • @tanvirtanvir6435
    @tanvirtanvir6435 Год назад +1

    9:36 masked attention block

  • @logicloudy2851
    @logicloudy2851 4 года назад +3

    Thanks, man. This is a really clear and high-level explanation. Really helpful for some guys like me who just stepped into this area.
    I read many explanations online. They give tons of details but fail in explaining these abstract items. These explanations always use other abstract definitions to explain this one. This problem happens again in the explanation of the "other abstract item". Sometimes I just forgot originally what I want to understand. Or even worse, they form a circulation...
    Thank you so much! This video helped me a lot in understanding the paper

  • @phai44
    @phai44 Месяц назад

    best video on Transformers on yt imo

  • @alainrieger6905
    @alainrieger6905 4 года назад

    prolly the best explanation on this topic on youtube

  • @emeralde3761
    @emeralde3761 2 года назад

    Just want to say this video is amazing. Watched like three other 30+ mins videos but they all failed to train my stupid brain. This 13 minutes video is intuitive, detailed, and beginner-friendly. Thank you :3

  • @ramyaneekashyap4356
    @ramyaneekashyap4356 4 года назад

    THE BEST one yet. Take a bow. You saved me.

  • @younus6133
    @younus6133 5 лет назад +25

    Thank You man.
    The underrated AI channel.

    • @CodeEmporium
      @CodeEmporium  5 лет назад +3

      Thanks homie. Spread the word if you can! :)

  • @paramveersingh2919
    @paramveersingh2919 3 года назад

    Watched Andrew Ng, watched this, you got me to stick through the video and Andrew who i consider one of the best in this field did not manage to express as clearly as you did! Cheers man, amazing video!

  • @GuagoFruit
    @GuagoFruit 2 года назад +2

    It always blows my mind how anyone figures out any of this.

  • @atwinemugume
    @atwinemugume 2 года назад

    I am now more confident to talk about transformers, it had been abstract to me before. Thank you so much, great explanation.

  • @jasminelee1720
    @jasminelee1720 3 года назад

    Really great video. I have taken so many classes that have discussed this model and never understood it until now. Thanks!

  • @theneilpowers
    @theneilpowers Год назад

    This earned a subscription! Excellent explanation!

  • @danielpwagner
    @danielpwagner 2 года назад

    Outstanding. Best explanation of transformers that I’ve seen by far.

  • @utsabkhakurel9742
    @utsabkhakurel9742 11 месяцев назад

    Simple and easy to understand. Great job!

  • @ganjarulez009
    @ganjarulez009 2 года назад

    Really nice explanation, allthough even after the video most of Transformers still seem like a big magic black-box. Fascinating stuff

  • @prateek4546
    @prateek4546 2 года назад

    Wow, the best explaination on youtube ! Had to subscribe after watching !

  • @derrxb
    @derrxb 4 года назад +5

    This is one of the best explanations for transformers I've come across online! Awesome job, man! Thanks. I'll totally recommend your channel to some classmates!! :)

    • @CodeEmporium
      @CodeEmporium  4 года назад

      Thanks! And Glad it's helpful! Spreading the word of my channel is the best thing you can do to help :)

  • @ishwarinalgirkar1193
    @ishwarinalgirkar1193 Год назад

    great job putting attention in simple words. Very intuitive!

  • @TheJonathanLugo
    @TheJonathanLugo Год назад

    Wow, I am so glad I found your channel. The concept is clearly explained and assumes an intelligent audience. Well done!

  • @lonewolf2547
    @lonewolf2547 4 года назад

    I cant believe you explained so complicated things in crystal clear format. Excellent job dude

  • @thomives4353
    @thomives4353 4 года назад +3

    This is an amazingly good video - thanks so much!

  • @praveenrajagopal9161
    @praveenrajagopal9161 3 года назад

    Brilliant piece of work! You nailed it in few mins!

  • @tvanpeer
    @tvanpeer Год назад +2

    Great video! I love the layered approach for explaining the concepts. Very well done. Thank you!

    • @CodeEmporium
      @CodeEmporium  Год назад +1

      I am super glad that approach helped

  • @firesongs
    @firesongs 2 года назад

    Even though this definitely assumes some intermediate working level knowledge of ML, best layman explanation on Transformers/Attention so far.

  • @graywire1684
    @graywire1684 3 года назад

    Best channel on the topic! Soo glad that I found this channel

  • @pathikghugare9918
    @pathikghugare9918 2 года назад

    Its been a year I still come back to this video to revise my transformer knowledge :)
    Thanks man!

  • @vahekassardjian5032
    @vahekassardjian5032 4 года назад +17

    Outstanding explanations: to the point and well illustrated. Thank you.

  • @ayushkant392
    @ayushkant392 4 года назад

    This channel is so under-rated. Amazing video

  • @ritwikdubey5331
    @ritwikdubey5331 Год назад

    I was searching for this particular explanation from a long tym! thanks for this!

  • @Fruchtkotzekiddy
    @Fruchtkotzekiddy 4 года назад

    this video was one of the best learning videos i EVER SAW
    first you give a high level overview, then u step in deeper
    every step with an understandable example
    THANK YOU SO MUCH!!!

    • @CodeEmporium
      @CodeEmporium  4 года назад

      You are very welcome. Thank you for the compliments :)

  • @autismo1969
    @autismo1969 Год назад +1

    that was an amazing content heavy explanation for just 13 minutes. thanks a lot!

  • @gokuson6399
    @gokuson6399 2 года назад +1

    Best explanation so far! Keep up the good work!

  • @TusharKale9
    @TusharKale9 3 года назад

    Superb explanation in 13 minutes. I have been watching videos over 1 hour long to get this concept. Well done and keep it up. Regards

  • @gage98
    @gage98 Год назад

    The best video I have seen on this topic. Great job

    • @CodeEmporium
      @CodeEmporium  Год назад

      Glad it was helpful! And Thanks for watching :)

  • @sairamsubramaniam8316
    @sairamsubramaniam8316 4 года назад

    This is the best explanation! I came in search for transformers but I found Gold.

  • @aneeshansain1009
    @aneeshansain1009 4 года назад +2

    Very well explained. Keep it up

  • @alexanderk5835
    @alexanderk5835 2 года назад

    Hey, thanks a lot, the explanation is great, the video explains much clearer than the lecture in the university.

  • @ze2411
    @ze2411 3 года назад

    Best video on Transformers!!! Thanks a mill!!!!!