Tiếp theoHướng dẫn tiếp theo
Chỉnh sửa chú ý chéo nhanh chóng
AI trực quan
HƯỚNG DẪN AI về ngôn ngữ
Cross-attention lets queries from one representation attend to keys and values from another representation.
Nghe hướng dẫn nàyAI thuật lại · ~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.
Bản tin miễn phí
Ba câu chuyện AI đã được xác minh vào mỗi buổi sáng các ngày trong tuần, được viết bằng tiếng Anh đơn giản. Miễn phí mãi mãi, không có quảng cáo.
Một email mỗi ngày trong tuần. Hủy đăng ký trong một cú nhấp chuột. Chúng tôi không bao giờ bán hoặc chia sẻ địa chỉ của bạn.
Tự kiểm tra
Phản hồi tức thì về mọi câu trả lời và chứng chỉ có thể chia sẻ với ID có thể xác minh sau khi bạn vượt qua khóa học.
Hỗ trợ giáo dục AI miễn phí. AI Understanding là tổ chức phi lợi nhuận 501(c)(3) — không bao giờ có quảng cáo, không có tường phí. Hãy quyên góp
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.
Sự chú ý chéo rút ra các truy vấn từ một chuỗi (ví dụ: bộ giải mã) và các khóa cũng như giá trị từ một chuỗi khác (ví dụ: bộ mã hóa), cho phép cả hai tương tác.
Bộ giải mã hình thành các truy vấn từ đầu ra được tạo một phần của nó, sau đó sử dụng đầu ra của bộ mã hóa làm khóa và giá trị để lấy thông tin đầu vào có liên quan.
Vì các truy vấn bắt nguồn từ một nguồn và khóa/giá trị từ một nguồn khác nên các chuỗi độc lập và có thể khác nhau về độ dài, ngôn ngữ hoặc phương thức.
Sự chú ý chéo cho phép từng phần của hình ảnh được tạo ra chú ý đến lời nhắc văn bản, làm nền tảng cho hình ảnh trong từ ngữ.
Cả hai đều sử dụng cùng một sự chú ý đến sản phẩm chấm theo tỷ lệ: điểm tương tự giữa các truy vấn và khóa, softmax, sau đó là tổng giá trị có trọng số.
Tiếp tục học hỏi
Đã chọn thêm hướng dẫn cho chủ đề này
Tiếp theoHướng dẫn tiếp theo
Chỉnh sửa chú ý chéo nhanh chóng
AI trực quan