Save this video free

Encoder-Only Transformers (like BERT) for RAG, Clearly Explained!!!

StatQuest with Josh Starmer · 18:52 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

StatQuest with Josh Starmer explains encoder-only Transformers, like BERT, focusing on their ability to create context-aware embeddings. These embeddings, derived from word embeddings, positional encoding, and self-attention, capture word order and relationships, enabling tasks like clustering similar sentences and documents, which is foundational for Retrieval Augmented Generation (RAG). Unlike decoder-only models (e.g., ChatGPT), encoder-only models excel at understanding and representing input text for downstream classification or retrieval tasks.

Key takeaways

Chapters

0:00 Introduction to Encoder-Only Transformers and Word Embeddings
9:53 Positional Encoding and Self-Attention for Contextualization

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 in code only Transformers can cluster things and classify things that's cool stack Quest hello I'm Josh starmer and welcome to stack Quest today we're going to talk about incoder only Transformers and they're going to be clearly explained this stack Quest is brought to you by the letters a b and c a always b b c curious always B curious note this stack Quest assumes that you are already familiar with the main ideas of how neural networks work if not check out the quest also note this stack Quest focuses on the main ideas of how encoder only Transformers work and what we can do with them that

0:50 said if you want to see the nitty-gritty details check out these fine quests okay way back in 2017 the first Transformer ever made had one part called an encoder and a second part called a decoder and the encoder and the decoder were connected to each other so they could work together this first Transformer was based on something called a seek to seek or an encoder decoder model encoder decoder models were designed to translate text in one language like English into another language like Spanish for for example Squatch might say pizza is great and the encoder would crunch a lot of numbers to encode the

1:38 input and the decoder would crunch a lot of numbers including the output from the encoder and ultimately decode those numbers into a translation La piz s magnifico bam however it wasn't long after this first encoder decoder transform was published that people realized that both parts could work just fine on their own it turned out that we could generate text including translations of text with just a decoder and these models which form the basis for chat GPT were named decoder

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, StatQuest with Josh Starmer.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.