Tiếp theoHướng dẫn tiếp theo
Chú ý nhiều truy vấn
Ngôn ngữ AI
HƯỚNG DẪN AI về ngôn ngữ
Grouped-Query Attention (GQA) shares key/value heads across groups of query heads.
Nghe hướng dẫn nàyAI thuật lại · ~1 min
The original GQA paper studies this as a tradeoff between multi-head and multi-query attention for decoder inference.
The GQA paper proposes grouping query heads so multiple query heads share key/value heads. MHA has one key/value head per query head; MQA shares a single key/value head across all queries; GQA lies between them. The paper evaluates GQA on language modeling and machine translation tasks and reports quality closer to MHA with inference speed closer to MQA in its experiments. It also reports uptraining existing MHA models using about 5% of original pretraining compute. These claims are limited to the paper’s models, tasks and setup.
Comparing MHA, GQA and MQA head sharing.
Estimating KV-cache size from the number of query heads and key/value groups.
Reading the paper’s reported quality/speed tradeoff on evaluated language-model tasks.
Reviewing the paper’s uptraining recipe for converting an MHA checkpoint to GQA.
Benchmark head-sharing choices on the target model and hardware. The original paper’s quality/speed results do not establish universal serving speedups or negligible quality loss across all systems.
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
Grouped-Query Attention (GQA) shares key/value heads across groups of query heads. The original GQA paper studies this as a tradeoff between multi-head and multi-query attention for decoder inference.
GQA giữ các đầu truy vấn riêng biệt nhưng cho phép mỗi nhóm chia sẻ một bộ đầu khóa và giá trị, thu nhỏ bộ đệm KV.
Nhiều đầu cung cấp cho mỗi đầu KV riêng; nhiều truy vấn chia sẻ một KV cho tất cả các đầu; GQA nằm giữa một số nhóm KV.
Khoản tiết kiệm được hiển thị tại thời điểm tạo, trong đó việc đọc bộ đệm KV là chi phí băng thông bộ nhớ chiếm ưu thế.
32 đầu truy vấn được chia cho 8 nhóm KV dùng chung giúp giảm gần bốn lần số khóa và giá trị được lưu trong bộ nhớ đệm.
The GQA paper reports quality closer to multi-head attention (MHA) with inference speed closer to multi-query attention (MQA) in its evaluated tasks. This is an empirical result, not a universal guarantee.
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ú ý nhiều truy vấn
Ngôn ngữ AI