Тёмный
No video :(

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

Chris Hay
Подписаться 16 тыс.
Просмотров 6 тыс.
50% 1

We look deep into the AI and look at how the embeddings layer of a Large Language Model such as Mistral-7B and Gemma-2B actually works.
You will learn how tokens and embeddings work and even extract out and load the embeddings layer from Gemma and Mistral into your own simple model, which we will use to visualize the model
You will see how an AI clusters terms together and how it can cluster similar words, build connections which cover not just similar words but also grouping of concepts such as colors, hotel chains, programming terms.
If you really want to understand how an LLM's works or even build your own LLM then starting with the first layer of a Generative AI model is the best place to start.
Github
-----------
github.com/chr...

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@chrishayuk
@chrishayuk 5 месяцев назад
this is the github repo: github.com/chrishayuk/embeddings
@guaranamedia
@guaranamedia 2 месяца назад
Excellent explanation. Thanks for making these examples.
@chrishayuk
@chrishayuk 2 месяца назад
You're very welcome!
@sumandawnmobile
@sumandawnmobile 5 месяцев назад
Its an great video to understand the internals via the visualization. Thanks Chris.
@rajneesh31
@rajneesh31 2 месяца назад
Damn, thank you RU-vid for recommending this channel. @chrishayuk is a gun. Thanks Chris
@chrishayuk
@chrishayuk 2 месяца назад
Very kind, glad you like the channel
@NERDDISCO
@NERDDISCO 5 месяцев назад
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 5 месяцев назад
Glad it was helpful!
@scitechtalktv9742
@scitechtalktv9742 5 месяцев назад
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 5 месяцев назад
yep, you got what i'm doing... i'm literally walking the stack
@chrishayuk
@chrishayuk 5 месяцев назад
so those videos will be coming
@scitechtalktv9742
@scitechtalktv9742 5 месяцев назад
@@chrishayukFantastic ! Those embeddings are crucially important for the workings of Large Language Models !
@johntdavies
@johntdavies 5 месяцев назад
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 5 месяцев назад
It’s almost like you’re reading my roadmap
@kenchang3456
@kenchang3456 5 месяцев назад
Thanks the visualization really helped me.
@chrishayuk
@chrishayuk 5 месяцев назад
so glad, seeing it at a lower level really demystifies what's going on
@andypai
@andypai 5 месяцев назад
Thank you! Great video!
@chrishayuk
@chrishayuk 3 месяца назад
thank you, glad it was useful
@Memes_uploader
@Memes_uploader 5 месяцев назад
Thank you so much! Thank you youtube algorithm for showing such a great video!
@chrishayuk
@chrishayuk 5 месяцев назад
Glad you enjoyed it!
@khalilbenzineb
@khalilbenzineb 5 месяцев назад
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 5 месяцев назад
that's a good shout
@khalilbenzineb
@khalilbenzineb 5 месяцев назад
Thx@@chrishayuk
@gregherringer7700
@gregherringer7700 5 месяцев назад
This helps thanks!
@chrishayuk
@chrishayuk 5 месяцев назад
Glad it helped! :)
@enlightenment5d
@enlightenment5d 4 месяца назад
Good! Where can I find your programs?
@chrishayuk
@chrishayuk 3 месяца назад
in my github repo github.com/chrishayuk
@lfzuniga31
@lfzuniga31 5 месяцев назад
based
Далее
How AI 'Understands' Images (CLIP) - Computerphile
18:05
why llama-3-8B is 8 billion parameters instead of 7?
25:40
Fine-Tune Llama3 using Synthetic Data
37:03
Просмотров 2,8 тыс.
Ollama 0.1.26 Makes Embedding 100x Better
8:17
Просмотров 45 тыс.
I wish every AI Engineer could watch this.
33:49
Просмотров 80 тыс.
RAG But Better: Rerankers with Cohere AI
23:43
Просмотров 57 тыс.