Inside the LLM: Visualizing the Embeddings Layer of Mistral-7B and Gemma-2B

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 33

  • @chrishayuk
    @chrishayuk  9 หลายเดือนก่อน +2

    this is the github repo: github.com/chrishayuk/embeddings

  • @sumandawnmobile
    @sumandawnmobile 9 หลายเดือนก่อน +3

    Its an great video to understand the internals via the visualization. Thanks Chris.

  • @scitechtalktv9742
    @scitechtalktv9742 9 หลายเดือนก่อน +3

    Fantastic video !
    I am wondering: I think it would also be very interesting to also be able have a visualization of not only the static embeddings you already did, but also a visualization of the so-called contextualized embeddings in a later layer of the model! These are the embeddings that are exposed to the attention mechanism. That why they are also called dynamic embeddings.
    It adds another layer of abstraction, but are better embeddings because they are able to distinguish between homonyms: words that are the same but have completely other meanings if used in another context. A good example is the word “bank”, that has several different meanings when used in another context (for example financial institution or river bank and several other meanings! ). As a consequence the word “bank” will be represented by several different vectors in embedding space, depending on the context it is used in!
    This technique is called Word Sense Disambiguation (WSD).
    Would it be possible to visualize that too? I am curious….

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +1

      yep, you got what i'm doing... i'm literally walking the stack

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +2

      so those videos will be coming

    • @scitechtalktv9742
      @scitechtalktv9742 9 หลายเดือนก่อน +1

      @@chrishayukFantastic ! Those embeddings are crucially important for the workings of Large Language Models !

  • @rajneesh31
    @rajneesh31 6 หลายเดือนก่อน +1

    Damn, thank you TH-cam for recommending this channel. @chrishayuk is a gun. Thanks Chris

    • @chrishayuk
      @chrishayuk  6 หลายเดือนก่อน

      Very kind, glad you like the channel

  • @NERDDISCO
    @NERDDISCO 9 หลายเดือนก่อน +4

    This came to the absolute right time! Thank you very much! I was just trying to understand this. Now I know how it works ❤

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +1

      Glad it was helpful!

  • @guaranamedia
    @guaranamedia 6 หลายเดือนก่อน +1

    Excellent explanation. Thanks for making these examples.

    • @chrishayuk
      @chrishayuk  6 หลายเดือนก่อน

      You're very welcome!

  • @johntdavies
    @johntdavies 9 หลายเดือนก่อน +2

    Great insight, thanks for posting this. It would be interesting to show how a fine-tuned model differs in similarities and "vocabulary". I'm also curious on the effects of quantisation, i.e. Q4, Q6, Q8, fp16 etc. on the internal "workings" of the LLM. Thanks again.

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +1

      It’s almost like you’re reading my roadmap

  • @andypai
    @andypai 9 หลายเดือนก่อน +1

    Thank you! Great video!

    • @chrishayuk
      @chrishayuk  7 หลายเดือนก่อน

      thank you, glad it was useful

  • @khalilbenzineb
    @khalilbenzineb 9 หลายเดือนก่อน +2

    I was playing a bit with finetuning to force an output schema for some 7B Models, but lately I discovered schema grammar, which is a way to dynamically play with the EOS tokens, by limiting them to a specific set of tokens, to generate the output you want, This is very stable and way efficient for many cases that we may think it requires finetuning, For me it felt like a new dimension to get the model intentions inline, I loved the unique and efficient way you create your videos, So I wanted to ask you if possible to create a video for us about this, I feel it's very important

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +2

      that's a good shout

    • @khalilbenzineb
      @khalilbenzineb 9 หลายเดือนก่อน

      Thx@@chrishayuk

  • @enlightenment5d
    @enlightenment5d 8 หลายเดือนก่อน +1

    Good! Where can I find your programs?

    • @chrishayuk
      @chrishayuk  7 หลายเดือนก่อน

      in my github repo github.com/chrishayuk

  • @kenchang3456
    @kenchang3456 9 หลายเดือนก่อน +1

    Thanks the visualization really helped me.

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน +1

      so glad, seeing it at a lower level really demystifies what's going on

  • @Memes_uploader
    @Memes_uploader 9 หลายเดือนก่อน +1

    Thank you so much! Thank you youtube algorithm for showing such a great video!

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน

      Glad you enjoyed it!

  • @gregherringer7700
    @gregherringer7700 9 หลายเดือนก่อน +1

    This helps thanks!

    • @chrishayuk
      @chrishayuk  9 หลายเดือนก่อน

      Glad it helped! :)

  • @lfzuniga31
    @lfzuniga31 9 หลายเดือนก่อน +1

    based