পরবর্তী আপপরবর্তী গাইড
প্রম্পট-টু-প্রম্পট ক্রস-অ্যাটেনশন সম্পাদনা
ভিজ্যুয়াল এআই
ভাষা এআই গাইড
Cross-attention lets queries from one representation attend to keys and values from another representation.
এই নির্দেশিকা শুনুনএআই-বর্ণিত · ~2 min
It is used to connect source and target sequences or different modalities.
Cross-attention lets queries from one representation attend to keys and values from another. The Transformer uses this in encoder-decoder layers; latent diffusion uses it for text-conditioned generation. Flamingo uses gated cross-attention layers to connect visual features to a language model and is designed to ingest arbitrarily interleaved visual and textual inputs, including images or video. These are architecture-specific examples, not a universal multimodal design. In Flamingo, cross-attention blocks are gated by a tanh-transformed learned scalar initialized to zero; this is an architecture-specific control and not a claim about how often cross-attention is used across multimodal systems.
In an encoder-decoder Transformer, decoder queries attend to encoder outputs.
Latent diffusion models use cross-attention to condition image latents on text embeddings.
Flamingo inserts cross-attention layers so a language model can use visual features.
Different sequence lengths are possible because queries and key-value context need not have matching lengths.
When inspecting a multimodal model, identify which stream supplies queries and which supplies keys and values. Evaluate alignment and failure cases across the relevant modalities. The cited papers do not establish one universal cross-attention design.
ফ্রি নিউজলেটার
প্রতি সপ্তাহের কাজের দিন সকালে তিনটি যাচাইকৃত এআই স্টোরি, সহজ ইংরেজিতে লেখা। চিরকালের জন্য ফ্রি, কোনো বিজ্ঞাপন নেই।
প্রতি সপ্তাহের কাজের দিনে একটি ইমেল। এক ক্লিকেই আনসাবস্ক্রাইব করুন। আমরা কখনোই আপনার ঠিকানা বিক্রি বা শেয়ার করি না।
নিজেকে পরীক্ষা করুন
প্রতিটি উত্তরের তাৎক্ষণিক ফিডব্যাক, এবং কোর্স পাস করার পর যাচাইযোগ্য আইডি সহ একটি শেয়ারযোগ্য সার্টিফিকেট।
ফ্রি এআই শিক্ষাকে সমর্থন করুন। AI Understanding একটি 501(c)(3) অলাভজনক প্রতিষ্ঠান — কোনো বিজ্ঞাপন নেই, কোনো পেওয়াল নেই, কখনোই না। একটি দান করুন
Cross-attention lets queries from one representation attend to keys and values from another representation. It is used to connect source and target sequences or different modalities.
ক্রস-অ্যাটেনশন একটি সিকোয়েন্স (যেমন, ডিকোডার) থেকে প্রশ্ন আঁকে এবং অন্য একটি (যেমন, এনকোডার) থেকে কী এবং মান দুটিকে ইন্টারঅ্যাক্ট করতে দেয়।
ডিকোডার তার আংশিকভাবে তৈরি আউটপুট থেকে প্রশ্ন তৈরি করে, তারপর প্রাসঙ্গিক ইনপুট তথ্য টানতে কী এবং মান হিসাবে এনকোডার আউটপুট ব্যবহার করে।
যেহেতু কোয়েরিগুলি একটি উত্স থেকে এবং অন্য থেকে কী/মানগুলি থেকে উদ্ভূত হয়, তাই ক্রমগুলি স্বাধীন এবং দৈর্ঘ্য, ভাষা বা পদ্ধতিতে পৃথক হতে পারে।
ক্রস-অ্যাটেনশন জেনারেট করা ছবির প্রতিটি অংশকে টেক্সট প্রম্পটে উপস্থিত হতে দেয়, শব্দের ভিজ্যুয়ালগুলিকে ভিত্তি করে।
উভয়ই একই স্কেলড ডট-প্রোডাক্ট মনোযোগ ব্যবহার করে: কোয়েরি এবং কীগুলির মধ্যে মিল স্কোর, একটি সফটম্যাক্স, তারপর মানগুলির একটি ওজনযুক্ত সমষ্টি।
শিখতে থাকুন
এই বিষয়ের জন্য বাছাই করা আরও গাইড
পরবর্তী আপপরবর্তী গাইড
প্রম্পট-টু-প্রম্পট ক্রস-অ্যাটেনশন সম্পাদনা
ভিজ্যুয়াল এআই