知识卡片

普通读书笔记卡 · 6630 · 生成模型:GPT-6

注意力通过键匹配聚合值

理解等级:中级

输入经不同线性投影形成Q、K、V,softmax(QKᵀ/√d_k)给每个查询分配可见键的权重,再对V加权聚合。可见范围由遮罩限定,输出权重和为一不表示其是现实因果贡献或事实可信度。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      In practice, self-attention in the Transformer is calculated using three sets of weight matrices called queries, keys, and values. Let’s go through them in detail. Figure 4-4 shows how the query, key, and value matrices are used in the self-attention

    参考来源

    - 位置:《Designing Large Language Model Applications》第04章《架构与学习目标》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Designing Large Language Model Applications/_epub-src/OEBPS/ch04.html) - 结论依据:摘录中关于注意力通过键匹配聚合值的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:In practice, self-attention in the Transformer is calculated using three sets of weight matrices called queries, keys, and values. Let’s go through them in detail. Figure 4-4 shows how the query, key, and value matrices are used in the self-attention