ต่อไปคำแนะนำต่อไป
การแก้ไขแบบเน้นความสนใจแบบทันทีทันใด
วิชวลเอไอ
คู่มือ AI ภาษา
ความสนใจข้ามช่วยให้การสอบถามจากตัวแทนหนึ่งเข้าร่วมกับคีย์และค่าจากตัวแทนอีกรายหนึ่ง
ฟังคำแนะนำนี้บรรยายโดย AI · ~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 ที่ตรวจสอบแล้ว 3 เรื่องทุกวันทำงาน เช้า, เขียนเป็นภาษาอังกฤษธรรมดา ฟรีตลอดไป ไม่มีโฆษณา
อีเมลหนึ่งฉบับทุกวันทำงาน ยกเลิกการสมัครในคลิกเดียว เราไม่เคยขายหรือแชร์ที่อยู่อีเมลของคุณ
ทดสอบตัวเอง
ข้อเสนอแนะทันทีสำหรับทุกคำตอบ และใบรับรองที่สามารถแชร์ได้พร้อม ID ที่ตรวจสอบได้เมื่อคุณผ่านหลักสูตร
สนับสนุนการศึกษา AI ฟรี 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.
ความสนใจข้ามจะดึงคำถามจากลำดับหนึ่ง (เช่น ตัวถอดรหัส) และคีย์และค่าจากอีกลำดับหนึ่ง (เช่น ตัวเข้ารหัส) โดยปล่อยให้ทั้งสองโต้ตอบกัน
ตัวถอดรหัสจะสร้างแบบสอบถามจากเอาต์พุตที่สร้างขึ้นเพียงบางส่วน จากนั้นใช้เอาต์พุตตัวเข้ารหัสเป็นคีย์และค่าเพื่อดึงข้อมูลอินพุตที่เกี่ยวข้อง
เนื่องจากการสืบค้นมาจากแหล่งหนึ่งและคีย์/ค่าจากอีกแหล่งหนึ่ง ลำดับจึงไม่ขึ้นอยู่กับความยาว ภาษา หรือรูปแบบที่แตกต่างกัน
การให้ความสนใจข้ามทำให้แต่ละส่วนของรูปภาพที่สร้างขึ้นสนใจกับข้อความแจ้ง โดยยึดถือภาพเป็นคำ
ทั้งสองใช้ความสนใจแบบดอทโปรดัคที่มีขนาดเท่ากัน: คะแนนความคล้ายคลึงกันระหว่างข้อความค้นหาและคีย์ ค่าซอฟต์แม็กซ์ จากนั้นจึงเป็นผลรวมของค่าแบบถ่วงน้ำหนัก
เรียนรู้ต่อไป
คำแนะนำเพิ่มเติมที่เลือกสำหรับหัวข้อนี้
ต่อไปคำแนะนำต่อไป
การแก้ไขแบบเน้นความสนใจแบบทันทีทันใด
วิชวลเอไอ