Zubnet AIसीखेंWiki › Encoder
मूल तत्व

Encoder

इसे भी कहा जाता है: Encoder Network, Feature Extractor
एक neural network component जो input data को compressed, information-rich representation (encoding) में बदलता है। Transformers में, encoder bidirectional attention का उपयोग करके पूर्ण input को process करता है और contextual representations उत्पन्न करता है। Autoencoders में, encoder input को latent bottleneck में compress करता है। Image generation में, VAE encoder images को latent space में बदलता है। Encoders कई architectures का "समझने वाला" आधा हिस्सा हैं।

यह क्यों मायने रखता है

Encoders हर जगह हैं: BERT एक encoder है, CLIP में एक text encoder और एक image encoder है, Stable Diffusion एक VAE encoder उपयोग करता है, RAG systems embedding के लिए encoder मॉडल उपयोग करते हैं। यह समझना कि encoder क्या करता है — input को एक उपयोगी representation में compress करना — आपको इन सभी systems को समझने में मदद करता है। Encoding की गुणवत्ता downstream की हर चीज़ की गुणवत्ता निर्धारित करती है।

गहन अध्ययन

एक Transformer encoder (BERT, T5 का बायाँ आधा) में, हर token bidirectionally हर दूसरे token पर attend करता है। इसका मतलब है कि "bank" शब्द का representation एक साथ "river" (बायाँ context) और "fishing" (दायाँ context) दोनों से जानकारी incorporate करता है। यह bidirectional attention ही कारण है कि encoder representations समझने के कार्यों के लिए decoder (केवल left-to-right) representations से समृद्ध हैं।

Encoder बनाम Decoder

मुख्य भेद: encoders input process करते हैं (समझना), decoders output generate करते हैं (निर्माण)। Encoders सब कुछ एक साथ देखते हैं (bidirectional)। Decoders केवल past tokens देखते हैं (causal/left-to-right)। यही कारण है कि encoder मॉडल (BERT) classification और search के लिए बेहतर हैं, जबकि decoder मॉडल (GPT, Claude) generation के लिए बेहतर हैं। Encoder-decoder मॉडल (T5, BART) input understanding के लिए encoder और output generation के लिए decoder उपयोग करते हैं, cross-attention द्वारा जुड़े हुए।

Multimodal Systems में Encoders

Multimodal systems आमतौर पर प्रत्येक modality के लिए अलग encoders उपयोग करते हैं: images के लिए vision encoder (ViT), text के लिए text encoder (BERT/CLIP), और संभावित रूप से speech के लिए audio encoders। ये एक shared space में embeddings उत्पन्न करते हैं, cross-modal understanding सक्षम करते हैं। प्रत्येक encoder की गुणवत्ता निर्धारित करती है कि system उस modality को कितनी अच्छी तरह समझता है। यही कारण है कि CLIP का training (image और text encoders को align करना) इतना प्रभावशाली था — इसने vision और language understanding के बीच एक bridge बनाया।

संबंधित अवधारणाएँ

← सभी शब्द
← Embedding Layer Existential Risk →
ESC