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

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

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

  • @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 года назад +793

    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 года назад +6

      @@CodeEmporium Pin this comment.

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

      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.

  • @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 :)

  • @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!

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

    @2:02 that vsauce thing was
    cool

  • @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!

  • @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. :)

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

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

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

    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

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

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

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

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

      You deserve 1M subscribers at least.

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

      Thank you for the kind words! Maybe one day

  • @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 Год назад +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.

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

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

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

  • @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!

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

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

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

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

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

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

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

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

    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.

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

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

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

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

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

  • @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! :)

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

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

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

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

  • @vaishnavvaidheeswaran3692
    @vaishnavvaidheeswaran3692 20 дней назад

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

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

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

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

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

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

    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.

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

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

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

  • @vtrandal
    @vtrandal Год назад +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.

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

    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)

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

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

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

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

  • @abhishekbhatia651
    @abhishekbhatia651 3 года назад +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.

  • @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 :)

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

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

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

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

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

    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.

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

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

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

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

  • @aram69420
    @aram69420 7 месяцев назад +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

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

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

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

    Really appreciate how the explanation is going from high level and down, thanks.

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

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

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

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

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

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

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

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

  • @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 :)

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

    A very good explanation about transformers, Thank you :)

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

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

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

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

    Best Channel for ai and ml on RUclips

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

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

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

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

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

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

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

    great job putting attention in simple words. Very intuitive!

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

    TOP OF TOP clear explanation you provided !!!

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

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

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

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

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

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

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

  • @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!

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

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

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

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

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

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

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

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

    Sir, you just earned yourself a like and subscription for this amazing video.
    My background is Mechanical Engineering, but I was still able to easily follow each step. Thanks man!

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

      Perfect! Glad this was useful to you. And thanks for your background info. Helps to know my audience to tailor these videos

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

    prolly the best explanation on this topic on youtube

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

    Good stuff, best explanation found so far, had been so confusing reading through the jargon on other sites.

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

      Glad this was useful. The idea was to avoid as much jargon as possible. And if used, make sure it's explained

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

    Best video on Transformers I have seen so far! The examples really help to understand how the architecture works. Subscribed.

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

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

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

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

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

    it is really straight forward video which talks exactly on what we need to learn !!

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

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

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

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

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

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

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

    Man! Brilliant video. I saw a 27 mins video and was totally spent out and didn't even understand much. But this was just awesome, and in half the time!
    The only thing lacking might be the examples of keys, values and queries but i mostly got the hang of it.

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

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

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

    Amazing way of explaining complex things in simple terms.

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

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

    This channel is so under-rated. Amazing video

  • @younus6133
    @younus6133 4 года назад +25

    Thank You man.
    The underrated AI channel.

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

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

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

    thanks. I had a lecture about Transformers and couldn't quite follow first

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

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

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

    너무 감사합니다ㅠㅜㅜ 덕분에 확 이해가네요. 배뎃 쌉공감 대체 이거 왜이렇게 안 유명하냐!!! thank you for your clear explanation!! This is what I was looking for!!!!!!

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

    This is an excellent video. This resembles the TLDR or the introduction to transformers.

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

    Best explanation.. even a beginner can understand 👍

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

    This video presents such a natural logical flow. It is very satisfying to watch. Could someone help me with some answers to these questions? Answers to these would really help orient me so I could then understand the deeper points of the video.
    1) This process of feeding the English and the French words is training right? (as opposed to the process of using the model to calculate a translation desired by the user)
    2) Assuming that yes, this video is about training, at what point do you say to the algorithm "The next French word was actually supposed to be 'chien'. Learn from that!"
    3) Is this video an example of an NSP training? How would it look different if it were MLM? I know what MLM is, but I'm asking more from a practical standoint, like what would you feed to the algorithm and at what time.
    Really great video nonetheless, I can tell it would be perfect if I just had a little more background (which I am working to develop)

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

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

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

      Glad it was helpful! And Thanks for watching :)

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

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

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

    Please, watch this video before reading the paper. Amazing.