← 返回刚才阅读的位置

知识卡片

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

共享键值减少缓存头数

理解等级:中级

GQA 保留多个查询头,但让一组查询共享一对键和值头,降低键值投影参数及缓存存储。查询头数需可被键值组数整除。它改变头的共享结构,不保证任何权重直接改成GQA就维持原模型能力。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Unlike MHA, where each head also has its own set of keys and values, to reduce memory usage, GQA groups multiple heads to share the same key and value projections, as shown in figure C.5.

    参考来源

    - 位置:《Build a Reasoning Model (From Scratch)》第09章《附录C Qwen3模型源码》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Build a Reasoning Model (From Scratch)/_epub-src/OEBPS/Text/appendix-c.html) - 结论依据:摘录中关于共享键值减少缓存头数的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Unlike MHA, where each head also has its own set of keys and values, to reduce memory usage, GQA groups multiple heads to share the same key and value projections, as shown in figure C.5.